// Use this for initialization void Start() { client = new BattlePlayerClient(); base.BaseStart(); myRotation.y = transform.rotation.eulerAngles.y; watchPointRotation.x = watchPoint.rotation.eulerAngles.x; watchPointRotation.y = watchPoint.rotation.eulerAngles.y; gunAngle = watchPointRotation.x; Cursor.visible = false; //控制鼠标显示和隐藏, true显示, false时隐藏 Cursor.lockState = CursorLockMode.Locked; //把鼠标锁定在窗口内,防止鼠标拖到边缘是显示 gun = currentGun; }
void Awake() { base.BaseAwake(); cc = GetComponent <CharacterController>(); client = new BattlePlayerClient(); }
// Use this for initialization void Start() { client = new BattlePlayerClient(); }