Esempio n. 1
0
    public override void Update()
    {
        if (Owner.IsAlive == false)
        {
            Interruptible = true;
        }

        if (Count == 3)
        {
            if (Action.IsActive() == false && ActionAttack == null)
            {
                Owner.SoundPlayBerserk();
                Owner.BlackBoard.Invulnerable = true;
                ActionAttack           = AgentActionFactory.Create(AgentActionFactory.E_Type.E_ATTACK) as AgentActionAttack;
                ActionAttack.Data      = Owner.AnimSet.GetFirstAttackAnim(Owner.BlackBoard.WeaponSelected, E_AttackType.O);
                ActionAttack.AttackDir = Owner.Forward;
                Owner.BlackBoard.ActionAdd(ActionAttack);
            }
            return;
        }

        WorldStateProp prop = Owner.WorldState.GetWSProperty(E_PropKey.E_EVENT);

        if (prop == null || prop.GetEvent() != E_EventTypes.Hit || Owner.IsAlive == false)
        {
            return;
        }

        SendAction();
    }
Esempio n. 2
0
    public override bool IsActionComplete()
    {
        if (Action != null && Action.IsActive() == false)
        {
            //UnityEngine.Debug.Log(this.ToString() + " complete !");
            return(true);
        }

        return(false);
    }