コード例 #1
0
    public override void UpdateMe()
    {
        if (_controllerInput != null)
        {
            var temp = transform.position;
            transform.position += _controllerInput.CheckMovement();
            if (Vector3.Distance(GameController.instance.GetGameCore().transform.position, this.transform.position) > range)
            {
                transform.position = temp;
            }

            if (SystemInfo.deviceType == DeviceType.Handheld)
            {
                transform.eulerAngles = _controllerInput.CheckRotation();
            }
            else
            {
                transform.LookAt(new Vector3(_controllerInput.CheckRotation().x,
                                             transform.position.y,
                                             _controllerInput.CheckRotation().z));
            }

            if (_controllerInput.InputShoot() && attack.Avaliable())
            {
                attack.Attack();
            }
        }
    }
コード例 #2
0
 public override void UpdateMe()
 {
     if (_myController != null)
         _myController.CheckMovement();
 }