Example #1
0
    private void Update()
    {
        if (isFlinching)
        {
            HandleInput();
            return;
        }

        if (inputSource.Move() != Vector3.zero)
        {
            transform.rotation = Quaternion.LookRotation(inputSource.Move());
        }

        this.transform.Translate((inputSource.Move() * moveSpeed) * Time.deltaTime, Space.World);
        IDragonCommand currentCommand = inputSource.Action();

        HandleInput();
    }
Example #2
0
 private void Start()
 {
     buttonX = new DeflectingCommand();
     buttonB = new DashCommand();
     buttonA = new FireCommand();
 }