Example #1
0
 public void ChangeStrategy(Strategy newStrategy)
 {
     mPrevAIStrategy = mAIStrategy;
     mAIStrategy = newStrategy;
 }
Example #2
0
 public Predator( float x, float y, Strategy strategy )
     : base(x, y, strategy)
 {
     mStrength = 200;
 }
Example #3
0
 public Boid(float x, float y, Strategy strategy)
 {
     Init( x, y, strategy );
 }
Example #4
0
        public void Init( float x, float y, Strategy strategy )
        {
            mPosition.X = x;
            mPosition.Y = y;
            mRadius = 20.0f;
            mStayAwayRadius = 200.0f;

            Random rand = new Random( 130 );
            mStrength = rand.Next(100) * 0.01f;
            mMaxStamina = 20 + rand.Next(80);
            mCurrStamina = mMaxStamina;
            mVelocity = Vector2.Zero;

            mAIStrategy = strategy;
            mPrevAIStrategy = strategy;
            mRandGen = new Random(43);
        }