예제 #1
0
    void UpdateSword()
    {
        SwordController sc = gameObject.GetComponentInChildren <SwordController>();

        sc.UpdateColour(attackPower / 100);

        attacking = sc.UpdateSword(attacking, charging);
    }
예제 #2
0
    void UpdateSword()
    {
        sc.UpdateColour(attackPower / 100);

        attacking = sc.UpdateSword(attacking, charging);

        // resetting after attack
        if (!attacking)
        {
            timeSinceLastAttack = 0.0f;

            attackReady = false;

            committed = false;

            attackPower = 0.0f;
        }
    }