Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        Agent     = GetComponent <Agent>();
        Transform = transform;

        Agent.BlackBoard.IsPlayer = true;

        Agent.AddGOAPAction(E_GOAPAction.gotoPos);
        Agent.AddGOAPAction(E_GOAPAction.move);
        Agent.AddGOAPAction(E_GOAPAction.playAnim);
        Agent.AddGOAPAction(E_GOAPAction.weaponHide);
        Agent.AddGOAPAction(E_GOAPAction.weaponShow);
        Agent.AddGOAPAction(E_GOAPAction.orderAttack);

        Agent.AddGoal(E_GOAPGoals.E_PLAY_ANIM);
        Agent.AddGoal(E_GOAPGoals.E_GOTO);
        //Agent.AddGoal(E_GOAPGoals.E_ORDER_ATTACK);

        Agent.InitializeGOAP();
    }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        #region PlayerComboAttacks
        PlayerComboAttacks[0] = new Combo() // FAST   Raisin Wave
        {
            SwordLevel = E_SwordLevel.One,
            ComboSteps = new ComboStep[] { new ComboStep()
                                           {
                                               AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[0]
                                           },
                                           new ComboStep()
                                           {
                                               AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[1]
                                           },
                                           new ComboStep()
                                           {
                                               AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[2]
                                           },
                                           new ComboStep()
                                           {
                                               AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.Two, Data = AnimSet.AttackData[3]
                                           },
                                           new ComboStep()
                                           {
                                               AttackType = E_AttackType.O, ComboLevel = E_ComboLevel.Three, Data = AnimSet.AttackData[4]
                                           }, }
        };
        PlayerComboAttacks[1] = new Combo() // BREAK BLOCK  half moon
        {
            SwordLevel = E_SwordLevel.One,
            ComboSteps = new ComboStep[] { new ComboStep()
                                           {
                                               AttackType = E_AttackType.O, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[5]
                                           },
                                           new ComboStep()
                                           {
                                               AttackType = E_AttackType.O, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[6]
                                           },
                                           new ComboStep()
                                           {
                                               AttackType = E_AttackType.O, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[7]
                                           },
                                           new ComboStep()
                                           {
                                               AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.Two, Data = AnimSet.AttackData[8]
                                           },
                                           new ComboStep()
                                           {
                                               AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.Three, Data = AnimSet.AttackData[9]
                                           }, }
        };
        PlayerComboAttacks[2] = new Combo() // CRITICAL  cloud cuttin
        {
            SwordLevel = E_SwordLevel.Two,
            ComboSteps = new ComboStep[] { new ComboStep()
                                           {
                                               AttackType = E_AttackType.O, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[5]
                                           },
                                           new ComboStep()
                                           {
                                               AttackType = E_AttackType.O, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[6]
                                           },
                                           new ComboStep()
                                           {
                                               AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[17]
                                           },
                                           new ComboStep()
                                           {
                                               AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.Two, Data = AnimSet.AttackData[18]
                                           },
                                           new ComboStep()
                                           {
                                               AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.Three, Data = AnimSet.AttackData[19]
                                           }, }
        };
        PlayerComboAttacks[3] = new Combo()  // flying dragon
        {
            SwordLevel = E_SwordLevel.Three,
            ComboSteps = new ComboStep[] { new ComboStep()
                                           {
                                               AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[0]
                                           },
                                           new ComboStep()
                                           {
                                               AttackType = E_AttackType.O, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[10]
                                           },
                                           new ComboStep()
                                           {
                                               AttackType = E_AttackType.O, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[11]
                                           },
                                           new ComboStep()
                                           {
                                               AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.Two, Data = AnimSet.AttackData[12]
                                           },
                                           new ComboStep()
                                           {
                                               AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.Three, Data = AnimSet.AttackData[13]
                                           }, }
        };
        PlayerComboAttacks[4] = new Combo() // KNCOK //walking death
        {
            SwordLevel = E_SwordLevel.Four,
            ComboSteps = new ComboStep[] { new ComboStep()
                                           {
                                               AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[0]
                                           },
                                           new ComboStep()
                                           {
                                               AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[1]
                                           },
                                           new ComboStep()
                                           {
                                               AttackType = E_AttackType.O, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[14]
                                           },
                                           new ComboStep()
                                           {
                                               AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.Two, Data = AnimSet.AttackData[15]
                                           },
                                           new ComboStep()
                                           {
                                               AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.Three, Data = AnimSet.AttackData[16]
                                           }, }
        };
        PlayerComboAttacks[5] = new Combo() // HEAVY, AREA  shogun death
        {
            SwordLevel = E_SwordLevel.Five,
            ComboSteps = new ComboStep[] { new ComboStep()
                                           {
                                               AttackType = E_AttackType.O, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[5]
                                           },
                                           new ComboStep()
                                           {
                                               AttackType = E_AttackType.X, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[20]
                                           },
                                           new ComboStep()
                                           {
                                               AttackType = E_AttackType.O, ComboLevel = E_ComboLevel.One, Data = AnimSet.AttackData[21]
                                           },
                                           new ComboStep()
                                           {
                                               AttackType = E_AttackType.O, ComboLevel = E_ComboLevel.Two, Data = AnimSet.AttackData[22]
                                           },
                                           new ComboStep()
                                           {
                                               AttackType = E_AttackType.O, ComboLevel = E_ComboLevel.Three, Data = AnimSet.AttackData[23]
                                           }, }
        };

        #endregion

        Owner.BlackBoard.IsPlayer = true;
        Owner.BlackBoard.Rage     = 0;
        Owner.BlackBoard.Dodge    = 0;
        Owner.BlackBoard.Fear     = 0;


        //InputComponent.Instance.AddReceiver(this);

        SpriteEffectsManager.Instance.CreateShadow(Transform.FindChild("root").gameObject, 1.3f, 1.3f);

        Agent.AddGOAPAction(E_GOAPAction.gotoPos);
        Agent.AddGOAPAction(E_GOAPAction.move);
        Agent.AddGOAPAction(E_GOAPAction.gotoMeleeRange);
        Agent.AddGOAPAction(E_GOAPAction.weaponShow);
        Agent.AddGOAPAction(E_GOAPAction.weaponHide);
        Agent.AddGOAPAction(E_GOAPAction.orderAttack);
        //Agent.AddGOAPAction(E_GOAPAction.orderAttackJump);
        Agent.AddGOAPAction(E_GOAPAction.orderDodge);
        Agent.AddGOAPAction(E_GOAPAction.rollToTarget);
        Agent.AddGOAPAction(E_GOAPAction.useLever);
        Agent.AddGOAPAction(E_GOAPAction.playAnim);
        Agent.AddGOAPAction(E_GOAPAction.teleport);
        Agent.AddGOAPAction(E_GOAPAction.injury);
        Agent.AddGOAPAction(E_GOAPAction.death);

        Agent.AddGOAPGoal(E_GOAPGoals.E_GOTO);
        Agent.AddGOAPGoal(E_GOAPGoals.E_ORDER_ATTACK);
        Agent.AddGOAPGoal(E_GOAPGoals.E_ORDER_DODGE);
        Agent.AddGOAPGoal(E_GOAPGoals.E_ORDER_USE);
        Agent.AddGOAPGoal(E_GOAPGoals.E_ALERT);
        Agent.AddGOAPGoal(E_GOAPGoals.E_CALM);
        Agent.AddGOAPGoal(E_GOAPGoals.E_USE_WORLD_OBJECT);
        Agent.AddGOAPGoal(E_GOAPGoals.E_PLAY_ANIM);
        Agent.AddGOAPGoal(E_GOAPGoals.E_TELEPORT);
        Agent.AddGOAPGoal(E_GOAPGoals.E_REACT_TO_DAMAGE);

        Agent.InitializeGOAP();

        Owner.BlackBoard.ActionHandlerAdd(this);

        //Controls.Start();
    }