Ejemplo n.º 1
0
    void LateUpdate()
    {
        if (StepTime < Time.timeSinceLevelLoad)
        {
            if (Owner.BlackBoard.MotionType == E_MotionType.Run)
            {
                Owner.SoundPlayStep();
                StepTime = Time.timeSinceLevelLoad + Random.Range(0.25f, 0.28f);
            }
            else if (Owner.BlackBoard.MotionType == E_MotionType.Walk)
            {
                Owner.SoundPlayStep();
                StepTime = Time.timeSinceLevelLoad + Random.Range(0.40f, 0.43f);
            }
        }

        if (CurrentAttackAction != null && CurrentAttackAction.IsActive() == false)
        {// no continue in combos !!!
            if (BufferedOrders.Count == 0 && Owner.WorldState.GetWSProperty(E_PropKey.E_ORDER).GetOrder() != AgentOrder.E_OrderType.E_ATTACK)
            {
                //Debug.Log("clear combo progress " + CurrentAttackAction.Data.AnimName);
                ComboProgress.Clear();
                GuiManager.Instance.ShowComboProgress(ComboProgress);
            }
            CurrentAttackAction = null;
        }
    }
Ejemplo n.º 2
0
    public override bool IsActionComplete()
    {
        if (ActionTount == null && ActionAttack != null && ActionAttack.IsActive() == false)
        {
            return(true);
        }

        return(false);
    }
Ejemplo n.º 3
0
    public override bool IsActionComplete()
    {
        if (Action.IsActive() == false)
        {
            return(true);
        }

        return(false);
    }
Ejemplo n.º 4
0
    public override bool IsActionComplete()
    {
        if (Action == null || (NumberOfAttacks == 0 && Action.IsActive() == false))
        {
            return(true);
        }

        return(false);
    }
Ejemplo n.º 5
0
    public override bool IsActionComplete()
    {
        if (Action != null && Action.IsActive() == false && (ActionAttack == null || ActionAttack.IsActive() == false))
        {
            //UnityEngine.Debug.Log(this.ToString() + " complete !");
            return(true);
        }

        return(false);
    }
Ejemplo n.º 6
0
    public override bool IsActionComplete()
    {
        if (Owner.WorldState.GetWSProperty(E_PropKey.E_ORDER).GetOrder() == AgentOrder.E_OrderType.E_ATTACK && Action.AttackPhaseDone)
        {// pokud uz ceka novy utok a je to pokracovani stavajiciho komba, tak skoncime o torchu drive !!
            if (Owner.BlackBoard.DesiredAttackPhase.FirstAttackInCombo == false)
            {
                //if (Owner.debugGOAP) Debug.Log(Time.timeSinceLevelLoad + " " + this.ToString() + " - IsActionComplete, next attack is waiting");
                return(true);
            }
        }

        if (Action.IsActive() == false)
        {
            return(true);
        }

        return(false);
    }