Esempio n. 1
0
        public CAI(GSGame mGame, CBody mCBody, CMovement mCMovement, CTargeter mCTargeter, CRender mCRender, bool mBig)
        {
            _game = mGame;
            _cBody = mCBody;
            _cTargeter = mCTargeter;
            _cMovement = mCMovement;
            _cRender = mCRender;
            _shootDelay = Utils.Random.Next(0, 80);
            _big = mBig;

            if (_big)
            {
                _shootDelayMax = 150;
                _speedMax = 60;
            }

            mCBody.OnCollision += (mCollisionInfo) =>
                                  {
                                      var entity = (Entity)mCollisionInfo.UserData;

                                      if (entity.HasTag(Tags.Wall))
                                      {
                                          _angle += 180 + Utils.Random.Next(-45, 45);
                                          _speed = Utils.Random.Next(0, 100);
                                          _rotationSpeed = 0.002f;
                                      }
                                  };
        }
Esempio n. 2
0
 public CControl(GSGame mGame, CBody mCBody, CMovement mCMovement, CTargeter mCTargeter, CRender mCRender)
 {
     _game = mGame;
     _cBody = mCBody;
     _cMovement = mCMovement;
     _cTargeter = mCTargeter;
     _cRender = mCRender;
 }
 public CPurification(GSGame mGame, CRender mCRender)
 {
     _game = mGame;
     _cRender = mCRender;
     _shootDelay = Utils.Random.Next(0, 100);
 }
Esempio n. 4
0
 private CPurification Purification(CRender mCRender)
 {
     return new CPurification(_game, mCRender);
 }
Esempio n. 5
0
 private CControl Control(CBody mCBody, CMovement mCMovement, CTargeter mCTargeter, CRender mCRender)
 {
     return new CControl(_game, mCBody, mCMovement, mCTargeter, mCRender);
 }
Esempio n. 6
0
 private CAI AI(CBody mCBody, CMovement mCMovement, CTargeter mCTargeter, CRender mCRender, bool mBig = false)
 {
     return new CAI(_game, mCBody, mCMovement, mCTargeter, mCRender, mBig);
 }