public void LaunchSnowball(Vector3 velocity) { if (currentState != PenguinSnowballThrowState.Charge) { commandQueue.Enqueue(new LaunchSnowballCommand(this, velocity)); return; } currentState = PenguinSnowballThrowState.Throw; snowballInst.LaunchVel = velocity; anim.SetTrigger(launchAnimTrigger); }
private void setState(PenguinSnowballThrowState newState) { currentState = newState; }