示例#1
0
 public ObstacleStub(GameScreen scrn, FPoint pos, ObstacleStubType t, float w, float h, float r) : base(scrn, GDConstants.ORDER_GAME_BLACKHOLE)
 {
     Center       = pos;
     Rotation     = r;
     Width        = w;
     Height       = h;
     Power        = EXPFACPOWERS[4];
     ObstacleType = t;
 }
示例#2
0
 public ObstacleStub(GameScreen scrn, SCCMLevelElement dat) : base(scrn, GDConstants.ORDER_GAME_BLACKHOLE)
 {
     Center       = dat.Obstacle_Center;
     Rotation     = dat.Obstacle_Rotation;
     Width        = dat.Obstacle_Width;
     Height       = dat.Obstacle_Height;
     Power        = dat.Obstacle_PowerFactor;
     ObstacleType = dat.Obstacle_ObstacleType;
 }
示例#3
0
        private void ChangeObstacleType()
        {
            ObstacleType = (ObstacleStubType)(((int)ObstacleType + 1) % 6);
            if (GDOwner.CanInsertObstacleStub(Position, ObstacleType, Width, Height, Rotation, this) == null)
            {
                Width    = GDConstants.TILE_WIDTH / 2f;
                Height   = GDConstants.TILE_WIDTH / 2f;
                Rotation = 0;
            }

            GDOwner.GDHUD.AttrPanel.Recreate(this);
        }