Пример #1
0
 public cCritter3DBoss(cGame pownergame = null) :
     base(pownergame)
 {
     if (pownergame != null)
     {
         rand        = new Random();
         BulletClass = new cCritterBulletRubber();
         //Sets the boss sprite
         Sprite = new cSpriteQuake(ModelsMD2.Vegeta);
         setHealth(20);
         WrapFlag     = cCritter.CLAMP;         //Prevents boss from going through walls
         Armed        = true;                   //Allows the character to use bullets
         MaxSpeed     = cGame3D.MAXPLAYERSPEED; //sets max speed
         AbsorberFlag = true;                   //Keeps boss from being buffered out
         addForce(new cForceGravity(50.0f));    //gravity
         AttitudeToMotionLock = false;
         //First param determines direction facing (forward/backward)
         Attitude = new cMatrix3(new cVector3(0.0f, 0.0f, 1.0f), new cVector3(1.0f, 0.0f, 0.0f),
                                 new cVector3(0.0f, 1.0f, 0.0f), Position);
         AimToAttitudeLock = true;   //aims in the direction of the attitude
         setMoveBox(_movebox);
         moveTo(new cVector3(_movebox.Midx, _movebox.Loy,
                             _movebox.Midz + 2.0f));
         //Sets the direction the boss is moving to the direction they are facing
         addForce(new cForceObjectSeek(Player, 3.0f));
         _waitshoot = (float)rand.NextDouble();
         setMoveBox(_movebox);
     }
 }
Пример #2
0
 public cCritterArmed(cGame pownergame = null)
     : base(pownergame)
 {
     _armed             = true;
     _aimvector         = new cVector3(0.0f, 1.0f);
     _ageshoot          = 0.0f;
     _waitshoot         = WAITSHOOT;
     _bshooting         = false;
     _aimtoattitudelock = false;
     _gunlength         = GUNLENGTH;
     BulletClass        = new cCritterBulletRubber();
     AimVector          = _tangent;
     _bulletlist        = new LinkedList <cCritterBullet>(
         delegate(out cCritterBullet c1, cCritterBullet c2)
     {
         c1 = c2;
     }
         );
 }