public bool GetNextCarriage() { if (numOfCar + 1 < train.Length) { numOfCar++; currentCarriage = train[numOfCar]; return(true); } return(false); }
public bool GetPreviousCarriage() { if (numOfCar - 1 >= 0) { numOfCar--; currentCarriage = train[numOfCar]; return(true); } return(false); }
//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); }