public void ChangeStrategy(Strategy newStrategy) { mPrevAIStrategy = mAIStrategy; mAIStrategy = newStrategy; }
public Predator( float x, float y, Strategy strategy ) : base(x, y, strategy) { mStrength = 200; }
public Boid(float x, float y, Strategy strategy) { Init( x, y, strategy ); }
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); }