Exemple #1
0
 internal void act()
 {
     if (behavior == null)
     {
         behavior = new BehaviorDefend();
     }
     behavior.action(this);
 }
Exemple #2
0
        public override void action(Monster parent)
        {
            BehaviorAbstract att = null;

            switch (Globals.Random(1, 10))
            {
            case 0:
                att = new BehaviorAttack();
                break;

            case 1:
                att = new BehaviorDefend();
                break;

            case 2:
                att = new BehaviorBasicFire();
                break;

            case 3:
                att = new BehaviorEmbers();
                break;

            case 4:
                att = new BehaviorFlameStorm();
                break;

            case 5:
                att = new BehaviorBasicWater();
                break;

            case 6:
                att = new BehaviorHurricane();
                break;

            case 7:
                att = new BehaviorBasicNature();
                break;

            case 8:
                att = new BehaviorNature();
                break;

            case 9:
                att = new BehaviorSuperNature();
                break;
            }

            att.action(parent);
        }
Exemple #3
0
 internal void SetBehavior(BehaviorAbstract behave)
 {
     behavior = behave;
 }
Exemple #4
0
 internal void SetBehavior(BehaviorAbstract behave)
 {
     behavior = behave;
 }
Exemple #5
0
 internal void act()
 {
     if (behavior == null)
         behavior = new BehaviorDefend();
     behavior.action(this);
 }