Beispiel #1
0
        // Update is called once per frame
        void Update()
        {
            meleCooldown -= Time.deltaTime;

            if (meleCooldown < 0)
            {
                meleCooldown = 0;
            }

            timeFromStart += Time.deltaTime;

            if (currentState.TransitionCheckDelay == 0)
            {
                currentState.UpdateState(this);
            }
            else
            {
                currentState.DoActions(this);
                if (timeFromStart >= currentState.TransitionCheckDelay)
                {
                    currentState.CheckTransitions(this);
                }
            }


            Animate();
        }