| 12345678910111213141516171819202122 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class YunCtrl : MonoBehaviour
- {
- public int speed = 0;
- public int orientation = 0;
- //£¨4.7 £¬5.1£©
- private void Start()
- {
- speed = Random.Range(5, 15);
- orientation = Random.Range(0, 2) == 0 ? -1 : 1;
- }
- void Update()
- {
- transform.RotateAround(GameMgr.instance.transform.position, Vector3.up, speed * Time.deltaTime * orientation);
- }
- }
|