Exemple #1
0
 public bool GetNextCarriage()
 {
     if (numOfCar + 1 < train.Length)
     {
         numOfCar++;
         currentCarriage = train[numOfCar];
         return(true);
     }
     return(false);
 }
Exemple #2
0
 public bool GetPreviousCarriage()
 {
     if (numOfCar - 1 >= 0)
     {
         numOfCar--;
         currentCarriage = train[numOfCar];
         return(true);
     }
     return(false);
 }
Exemple #3
0
        //public void Init(SceneData sceneData)
        public void Init()
        {
            currentWindow = CurrentWindow.Carriage;
            player        = new Management.Player(3200);
            instance      = this;
            //print($" CAR {sceneData.TrainCars[2].name}");
            //currentCarriage = sceneData.TrainCars[2].GetComponentInChildren<Container>();
            currentCarriage = train[numOfCar];

            positionController.Init();
            inventory.Init();
            uiController.Init();
            shop.Init();
            description.SetActive(false);
            properties.GetComponentInChildren <AmmoSlots>().Init();
            properties.SetActive(false);
        }