public Tile(Objects.Tile tile) { this.X = tile.X; this.Y = tile.Y; this.OwnerId = tile.Owner?.Id; this.Team = tile.Owner?.Team; this.TempActorId = tile.TempObject?.Id; this.Height = tile.Height; this.NativeId = tile.Native.Id; this.Unbearable = tile.Native.Unbearable; this.Revealed = tile.Revealed; }
// This function is called by GameState when a new tile is selected public void NewSelectedTile(Objects.Tile t) { // Select the correct button grid depending on what's on this tile if (t == null) { SwitchGrid(eGridState.Default); } else if (t.Tower == null && t.Buildable) { SwitchGrid(eGridState.Build); } else if (t.Tower == null || t.Tower.TowerType == eTowerType.Base) { SwitchGrid(eGridState.Default); } else { SwitchGrid(eGridState.Upgrade); } }
/// <summary> /// Use the item on a tile (eg. fish, rope, pick, shovel, etc). /// </summary> /// <param name="onTile"></param> /// <returns></returns> public bool Use(Objects.Tile onTile) { return(Packets.Outgoing.ItemUseOnPacket.Send(client, location.ToLocation(), (ushort)id, 0, onTile.Location, (ushort)onTile.Ground.Id, 0)); }