예제 #1
0
        public override void DoAction(AEntity targetEntity)
        {
            double nextNum = RandomG.RandomNumbers(-100, 200);

            if (nextNum < -50)
            {
                this.Attack(targetEntity);
            }
            else if (nextNum >= -50 && nextNum < 50)
            {
                this.Sleeping();
            }
            else if (nextNum >= 50 && nextNum < 100)
            {
                this.SearchingForFood();
            }
            else if (nextNum >= 100 && nextNum < 150)
            {
                this.Move(new Point2D);
            }
            else
            {
                this.Analyze();
            }
        }
예제 #2
0
 public virtual void DoAction(AEntity targetEntity)
 {
     this.Attack(targetEntity);
 }