//SimpleRenderer renderer; public override void Load() { //gen = new TestTerrainGenerator(); //chunk = new Chunk(Vector2Int.Zero); //renderer = new SimpleRenderer(); //saveManager = new SaveManager("TestWorld"); //gen.Generate(chunk); //saveManager.SaveChunk(chunk); segment = new Segment("TestWorld"); segment.LoadArea(Vector2Int.Zero); World.UpdateDayLight(); BananaGame.GamePlayer = new Player(); BananaGame.GamePlayer.Load(); ControllerManager.AddPlayer(BananaGame.GamePlayer); BananaGame.GameCamera.FollowTaget = true; BananaGame.GameCamera.Target = (BananaGame.GamePlayer); //GameCamera.TargetOffset = new Vector3(0.0f, 0f, 10f); BananaGame.GameCamera.TargetOffset = new Vector3(0.0f, 0f, 16f); //renderer = new SimpleRenderer(); }
public override void Load() { highlight = new TileHighlight(new Vector2(20, 20), Color.Blue); chunk = new Chunk(new Vector2Int(0, 0)); renderer = new SimpleRenderer(); chunk.State = ChunkState.NotSoReady; chunk.Add(new Tile(TileType.Floor, new Vector2Int(0, 0))); chunk.Add(new Tile(TileType.Floor, new Vector2Int(20, 20))); chunk.Add(new Tile(TileType.Floor, new Vector2Int(21, 20))); chunk.Add(new Tile(TileType.Floor, new Vector2Int(22, 20))); chunk.Add(new Tile(TileType.Floor, new Vector2Int(20, 21))); chunk.Add(new Tile(TileType.Floor, new Vector2Int(21, 21))); chunk.Add(new Tile(TileType.Floor, new Vector2Int(22, 21))); chunk.Add(new Tile(TileType.Floor, new Vector2Int(20, 22))); chunk.Add(new Tile(TileType.Floor, new Vector2Int(21, 22))); chunk.Add(new Tile(TileType.Floor, new Vector2Int(22, 22))); chunk.Add(new Tile(TileType.Wall, new Vector2Int(19, 20))); chunk.Add(new Tile(TileType.Wall, new Vector2Int(19, 21))); chunk.Add(new Tile(TileType.Wall, new Vector2Int(19, 22))); chunk.Add(new Tile(TileType.Wall, new Vector2Int(23, 20))); chunk.Add(new Tile(TileType.Wall, new Vector2Int(23, 22))); chunk.Add(new Tile(TileType.Wall, new Vector2Int(23, 21))); chunk.Add(new Tile(TileType.Wall, new Vector2Int(20, 19))); chunk.Add(new Tile(TileType.Wall, new Vector2Int(21, 19))); chunk.Add(new Tile(TileType.Wall, new Vector2Int(22, 19))); chunk.Add(new Tile(TileType.Wall, new Vector2Int(20, 23))); //chunk.Add(new Tile(TileType.Wall, new Vector2Int(21, 23))); chunk.Add(new Tile(TileType.Floor, new Vector2Int(21, 23))); chunk.Add(new Tile(TileType.Wall, new Vector2Int(22, 23))); chunk.Add(new Tile(TileType.Wall, new Vector2Int(19, 19))); chunk.Add(new Tile(TileType.Wall, new Vector2Int(19, 23))); chunk.Add(new Tile(TileType.Wall, new Vector2Int(23, 19))); chunk.Add(new Tile(TileType.Wall, new Vector2Int(23, 23))); TileProcessor.Initialize(); TileProcessor.Process(chunk); World.UpdateDayLight(); BananaGame.GamePlayer = new Player(); BananaGame.GamePlayer.Position = new Vector2(20, 20); BananaGame.GamePlayer.Load(); ControllerManager.AddPlayer(BananaGame.GamePlayer); BananaGame.GameCamera.FollowTaget = true; BananaGame.GameCamera.Target = (BananaGame.GamePlayer); //GameCamera.TargetOffset = new Vector3(0.0f, 0f, 10f); BananaGame.GameCamera.TargetOffset = new Vector3(0.0f, 0f, 12f); }
void Update() { if(cm.NumPlayers < 4) { if(cm.AddPlayer(ControllerInputWrapper.Buttons.Start)) { for(int i = 0; i < players.Length; i++) { if(players[i].player == (PlayerID)cm.NumPlayers) { AddPlayer((PlayerID)cm.NumPlayers,players[i]); } } } } }
void Update() { if (cm.NumPlayers < 4) { if (cm.AddPlayer(ControllerInputWrapper.Buttons.Start)) { for (int i = 0; i < players.Length; i++) { if (players[i].player == (PlayerID)cm.NumPlayers) { LevelManager.instance.playerDict.Add((PlayerID)cm.NumPlayers, players[i]); LevelManager.instance.playerUI[(int)players[i].player - 1].SetupUI(); } } } } }
public override void Load() { generator = new TestTerrainGenerator(); renderer = new SimpleRenderer(); chunk = new Chunk(new Vector2Int(0, 0)); chunk.State = ChunkState.AwaitingRender; generator.Generate(chunk); chunk.Add(new Tile(TileType.Dirt, new Vector2Int(20, 20))); chunk.Add(new Tile(TileType.Dirt, new Vector2Int(20, 21))); chunk.Add(new Tile(TileType.Dirt, new Vector2Int(20, 22))); chunk.Add(new Tile(TileType.Dirt, new Vector2Int(21, 20))); chunk.Add(new Tile(TileType.Dirt, new Vector2Int(21, 21))); chunk.Add(new Tile(TileType.Dirt, new Vector2Int(21, 22))); chunk.Add(new Tile(TileType.Wall, new Vector2Int(30, 30))); chunk.Add(new Tile(TileType.Wall, new Vector2Int(31, 30))); chunk.Add(new Tile(TileType.Wall, new Vector2Int(32, 30))); chunk.Add(new Tile(TileType.Door, new Vector2Int(33, 30))); chunk.Add(new Tile(TileType.Wall, new Vector2Int(34, 30))); chunk.Add(new Tile(TileType.Wall, new Vector2Int(35, 30))); chunk.Add(new Tile(TileType.Wall, new Vector2Int(36, 30))); chunk.Add(new Tile(TileType.Wall, new Vector2Int(30, 31))); chunk.Add(new Tile(TileType.Wall, new Vector2Int(31, 31))); chunk.Add(new Tile(TileType.Wall, new Vector2Int(32, 31))); chunk.Add(new Tile(TileType.Wall, new Vector2Int(33, 31))); chunk.Add(new Tile(TileType.Wall, new Vector2Int(34, 31))); chunk.Add(new Tile(TileType.Wall, new Vector2Int(35, 31))); chunk.Add(new Tile(TileType.Wall, new Vector2Int(36, 31))); //chunk.Add(new Tile(TileType.Door, new Vector2Int(20, 20))); TileProcessor.Initialize(); TileProcessor.Process(chunk); World.UpdateDayLight(); BananaGame.GamePlayer = new Player(); BananaGame.GamePlayer.Load(); ControllerManager.AddPlayer(BananaGame.GamePlayer); BananaGame.GameCamera.FollowTaget = true; BananaGame.GameCamera.Target = (BananaGame.GamePlayer); //GameCamera.TargetOffset = new Vector3(0.0f, 0f, 10f); BananaGame.GameCamera.TargetOffset = new Vector3(0.0f, 0f, 16f); }
void Update() { cm.AddPlayer(ControllerInputWrapper.Buttons.Start); }