Example #1
0
    public override void Enter()
    {
        base.Enter();
        FireSlimeBossAI fireSlimeBossAI = (FireSlimeBossAI)GetAI();

        if (childrenStates.Count == 0)
        {
            ConditionHaveEnemy_FireSlimeBoss conditionHaveEnemy = new ConditionHaveEnemy_FireSlimeBoss();
            MoveToEnemy_FireSlimeBoss        moveToEnemy        = new MoveToEnemy_FireSlimeBoss();
            moveToEnemy.SetCharacterAI(GetAI());
            conditionHaveEnemy.SetCharacterAI(GetAI());

            AddChild(conditionHaveEnemy);
            AddChild(moveToEnemy);
        }
        Debug.Log("进入移动向敌人状态");
    }
Example #2
0
 public void SetMoveToEnemy(MoveToEnemy_FireSlimeBoss moveToEnemy)
 {
     this.moveToEnemy = moveToEnemy;
 }