StoneMove.cs 496 B

12345678910111213141516171819202122232425
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class StoneMove : MonoBehaviour {
  5. public float MoveSpeed;
  6. // Use this for initialization
  7. void Start () {
  8. }
  9. // Update is called once per frame
  10. //石头的移动和旋转
  11. void Update () {
  12. transform.Rotate(Vector3.right*150f*Time.deltaTime,Space.Self);
  13. transform.Translate(Vector3.forward*MoveSpeed*Time.deltaTime,Space.World);
  14. }
  15. }