Exemplo n.º 1
0
    public override void Enter()
    {
        base.Enter();
        FireSlimeBossAI fireSlimeBossAI = (FireSlimeBossAI)GetAI();

        ;
        if (childrenStates.Count == 0)
        {
            ConditionCoolTime_FireSlimeBoss conditionCoolTime   = new ConditionCoolTime_FireSlimeBoss(2);
            RepeatDecoratorNode             repeatDecoratorNode = new RepeatDecoratorNode(3);
            RepeatGuideMagma_FireSlimeBoss  repeatGuideMagma    = new RepeatGuideMagma_FireSlimeBoss();
            conditionCoolTime.SetCharacterAI(GetAI());
            repeatDecoratorNode.SetCharacterAI(GetAI());
            repeatGuideMagma.SetCharacterAI(GetAI());
            repeatDecoratorNode.AddChild(repeatGuideMagma);

            AddChild(conditionCoolTime);
            AddChild(repeatDecoratorNode);
        }
        Debug.Log("判断skill3");
    }
Exemplo n.º 2
0
    public override void Enter()
    {
        base.Enter();
        FireSlimeBossAI fireSlimeBossAI = (FireSlimeBossAI)GetAI();
        FireSlimeBoss   fireSlimeBoss   = (FireSlimeBoss)fireSlimeBossAI.getCharacter();

        if (childrenStates.Count == 0)
        {
            ConditionCoolTime_FireSlimeBoss  conditionCoolTime  = new ConditionCoolTime_FireSlimeBoss(0);
            ConditionHaveEnemy_FireSlimeBoss conditionHaveEnemy = new ConditionHaveEnemy_FireSlimeBoss();
            RepeatDecoratorNode          repeatDecoratorNode    = new RepeatDecoratorNode(5);
            LaunchFireBomb_FireSlimeBoss launchFireBomb         = new LaunchFireBomb_FireSlimeBoss();
            conditionCoolTime.SetCharacterAI(GetAI());
            conditionHaveEnemy.SetCharacterAI(GetAI());
            repeatDecoratorNode.SetCharacterAI(GetAI());
            launchFireBomb.SetCharacterAI(GetAI());

            repeatDecoratorNode.AddChild(launchFireBomb);
            AddChild(conditionCoolTime);
            AddChild(conditionHaveEnemy);
            AddChild(repeatDecoratorNode);
        }
        Debug.Log("判断skill1");
    }