//Weapon change event - called when player changes weapon
    public void WeaponChange(Component sender)
    {
        //Has player changed to this weapon?
        if (sender.GetInstanceID() == GetInstanceID())
        {
            return;
        }

        //Has changed to other weapon. Hide this weapon
        StopAllCoroutines();
        SpriteAnimator.StopSpriteAnimation();
        //Deactivate equipped
        IsEquipped = false;

        SpriteAnimator.HideAllSprites();
    }
Beispiel #2
0
    //Handle patrol state
    public void Patrol()
    {
        AttackAnimator.HideAllSprites();

        StartAnimator(PatrolAnimator);
    }
Beispiel #3
0
    //Entered Attack State
    public void Attack()
    {
        PatrolAnimator.HideAllSprites();

        StartAnimator(AttackAnimator);
    }