// for guiding, navigatoin instruction, instruction and replay phase public static void GuidingPhaseInitSetup(FirstTruckActions _firstTruck, SecondTruckActions _secondTruck) { _firstTruck.SetAtStartPosition(); _secondTruck.SetAtStartPosition(); ActivateTruckObject(_firstTruck); DeactivateTruckObject(_secondTruck); }
// for accident phase public static void AccidentPhaseInitSetup(FirstTruckActions _firstTruck, SecondTruckActions _secondTruck) { _firstTruck.SetAtEndPosition(); _secondTruck.SetAtStartPosition(); TruckActions[] truckActions = { _firstTruck, _secondTruck }; foreach (TruckActions truckAction in truckActions) { ActivateTruckObject(truckAction); } }
private bool CheckDynamicObjectReference() { var truckAndPlayerAreAssigned = truck != null && playerHead != null; if (!truckAndPlayerAreAssigned) { return(false); } if (truckActions != null) { return(true); } truckActions = truck.GetComponent <SecondTruckActions>(); truckActions.SetAtStartPosition(); return(true); }