예제 #1
0
 public void nextHome()
 {
     if ((int)currentHome == (numHomeTypes - 1))
     {
         currentHome = HomeEnum.A;
     }
     else
     {
         currentHome++;
     }
 }
예제 #2
0
 public void prevHome()
 {
     if ((int)currentHome == 0)
     {
         currentHome = (HomeEnum)(numHomeTypes - 1);
     }
     else
     {
         currentHome--;
     }
 }
예제 #3
0
 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();
 }
예제 #4
0
        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()}");
            }
        }