void Start() { // TODO: Add player classes with different stats Floor = 0; Energy = 20; Attack = 20; Dice = 20; Defence = 10; Gold = 0; Inventory = new List <string>(); // Initialize starting room RoomIndex = new Vector2(2, 2); world.PlayerPosition = RoomIndex; // Grab the Room from the world builder that corresponds to the player's roomindex and set room to that this.Room = world.Dungeon[(int)RoomIndex.x, (int)RoomIndex.y]; // Make sure starting Room is empty this.Room.Empty = true; encounter.ResetDynamicControls(); // Initialize the UI UIController.OnPlayerStatChange(); UIController.OnPlayerInventoryChange(); UIController.UpdateRoom(RoomIndex); /** Opening Cutscene **/ //RunCutScene("open"); /** Opening Setting. Initialize first room */ Investigate(); }
public void Investigate() { this.Room = world.Dungeon[(int)RoomIndex.x, (int)RoomIndex.y]; encounter.ResetDynamicControls(); if (this.Room.Empty) { Journal.Instance.Log("You find yourself in an empty room"); } else if (this.Room.Chest != null) { Journal.Instance.Log("You've found a chest! What would you like to do?"); encounter.StartChest(); } else if (this.Room.Enemy != null) { Journal.Instance.Log("You are jumped by a " + this.Room.Enemy.Description + "! What would you like to do?"); encounter.StartCombat(); } else if (this.Room.Exit) { Journal.Instance.Log("You've found the exit to the next floor. Would you like to continue?"); encounter.StartExit(); } }
void Start() { armor = ArmorDataBase.Instance.GetArmor(0); weapon = WeaponDataBase.Instance.GetWeapon(1); Turn = 0; MaxEnerngy = 50; Energy = 50; Attack = 5; Defense = 0; Gold = 50; Velocity = 10; Agility = 3; StatCost = 10; Inventory = new List <Item>(); RoomIndex = new Vector2(0, 0); this.Room = world.Dungeon[(int)RoomIndex.x, (int)RoomIndex.y]; this.Room.Empty = true; enconter.ResetDynamicControls(); Map.Instance.ChangeColor(RoomIndex, Color.red); }