public override void Update(float dt) { if (Keyboard.GetState().IsKeyDown(Keys.Space) && !hit) { dungeon.Generate(9, 6); hit = true; } if (Keyboard.GetState().IsKeyUp(Keys.Space) && hit) { hit = false; } if (Keyboard.GetState().IsKeyDown(Keys.Up)) { camera.Y -= camera.Speed; } if (Keyboard.GetState().IsKeyDown(Keys.Down)) { camera.Y += camera.Speed; } if (Keyboard.GetState().IsKeyDown(Keys.Left)) { camera.X -= camera.Speed; } if (Keyboard.GetState().IsKeyDown(Keys.Right)) { camera.X += camera.Speed; } }
// Start is called before the first frame update void Start() { StateMachine = GetComponent <StateMachine>(); Map.Generate(100, 100); // set the camera to follow the player GameController.Instance.Cinemachine.Follow = Map.Player.transform; StateMachine.ChangeState <PlayerTurnDungeonState>(); Iterator = CreateActorTurnEnumerable().GetEnumerator(); }
internal override void Load() { // Dungeon dungeon = new DungeonMap(); dungeon.Generate(9, 6); minimap = new DungeonMinimap(); minimap.DungeonMap = dungeon; // Camera camera = new Camera(); }