public KeepBuilder(GameController input, GameUI ui, CameraMover camera, KeepType type) : base(input, ui, camera, type.MyTypeInstance, Cost.Free) { AbleFront = Color.Blue; cwUI = new BaseCustomWindowUI(ui, type.Name, ""); }
Keep(ILevelManager level, IBuilding building, KeepType myType) : base(level, building) { this.myType = myType; TileInFront = level.Map.GetContainingTile(building.Center + building.Forward * 3); nodes = new Dictionary <ITile, IBuildingNode>(); }
public static Keep CreateNew(ILevelManager level, IBuilding building, KeepType myType) { Keep newKeep = null; try { newKeep = new Keep(level, building, myType); newKeep.CreatePathfindingNodes(); StaticRangeTarget.CreateNew(newKeep, level, building.Center); newKeep.clicker = Clicker.CreateNew(newKeep, level); newKeep.clicker.Clicked += newKeep.KeepClicked; newKeep.healthBar = new HealthBarControl(level, building, 100, new Vector3(0, 3, 0), new Vector2(2f, 0.2f), false); newKeep.window = building.Player == level.HumanPlayer ? new KeepWindow(newKeep) : null; return(newKeep); } catch (Exception e) { newKeep?.Dispose(); throw; } }
public static Keep CreateForLoading(ILevelManager level, IBuilding building, KeepType myType) { return(new Keep(level, building, myType)); }