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; }
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; }
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); }