public void nextHome() { if ((int)currentHome == (numHomeTypes - 1)) { currentHome = HomeEnum.A; } else { currentHome++; } }
public void prevHome() { if ((int)currentHome == 0) { currentHome = (HomeEnum)(numHomeTypes - 1); } else { currentHome--; } }
private HomeFactory() { // Load home models HomeModels = new Dictionary <HomeEnum, GameObject>(); LoadModels(); // Home Selection currentHome = HomeEnum.A; numHomeTypes = Enum.GetValues(typeof(HomeEnum)).Length; // Offsets homeOffsets = new Dictionary <HomeEnum, Vector3>(); populateOffsets(); }
public HomeContext(HomeEnum homeEnum) { this.Home = new Home(); //Set default state switch (homeEnum) { case HomeEnum.Skywalker: this._state = new StateSkywalkerParent(); break; case HomeEnum.Solo: this._state = new StateSoloParent(); break; default: throw new System.Exception($"No mapping states with HomeEnum: {homeEnum.ToString()}"); } }