示例#1
0
文件: SpeedEnemy.cs 项目: JovannyM/DB
 public SpeedEnemy(Vector2f position)
 {
     RVG           = new RotationVaritableGroup();
     Sprite        = new Sprite(Resurses.SpeedEnemyTexture, new IntRect(0, 0, 158, 84));
     Sprite.Origin = new Vector2f(79, 42);
     Position      = position;
     Speed         = 1.5f;
     Heath         = 2f;
 }
示例#2
0
 public TorEnemy(Vector2f position, Action <object, BulletSpawnArgs> shoot)
 {
     Sprite = new Sprite()
     {
         Texture     = Resurses.TorTexture,
         TextureRect = new IntRect(0, 0, 158, 84),
         Origin      = new Vector2f(79, 42),
         Position    = position
     };
     Speed      = 0.5f;
     Heath      = 3f;
     ETowers    = new ETower[1];
     ETowers[0] = new ETower(Resurses.ETowerTexture, Position, 2, shoot);
     RVG        = new RotationVaritableGroup();
 }
示例#3
0
 public Tank(Vector2f position)
 {
     Sprite = new Sprite(Resurses.TankTexture, new IntRect(0, 0, 158, 84))
     {
         Origin   = new Vector2f(79, 42),
         Position = position
     };
     Bounds[0] = new Sprite()
     {
         TextureRect = new IntRect(0, 0, 60, 60), Origin = new Vector2f(30, 30), Texture = new Texture("Textures\\Objects\\noname.png")
     };
     for (int i = 1; i < Bounds.Length; i++)
     {
         Bounds[i] = new Sprite()
         {
             TextureRect = new IntRect(0, 0, SizeRectBounds, SizeRectBounds),
             Origin      = new Vector2f(SizeRectBounds / 2f, SizeRectBounds / 2f),
             Texture     = new Texture("Textures\\Objects\\noname.png")
         };
     }
     Tower   = new Tower(Position);
     RVGTank = new RotationVaritableGroup();
 }