public void Init(Base.Tank[] _PlayerTanks) { GameState.gameStatManager = this; enabled = true; SetTanks(_PlayerTanks); mainGameUI.Init(PlayerStats[GameState.playerID]); localPlayerTank = _PlayerTanks[GameState.playerID]; }
public void Init() { enabled = true; GameState.nPlayer = 1; GameState.playerID = 0; statManager.Init(Players); Singletons.gameRoutineController.RegisterNewTank(); playerCamera = Instantiate(cameraPrefab).GetComponent <Base.CameraController>(); playerTank = Instantiate(playerPrefab, birthPoints.points[0].position, birthPoints.points[0].rotation).GetComponentInChildren <Tank>(); Players[0] = playerTank; playerTank.InitOnOfflineGame(0, instructionManager.GetInstruction()); playerCamera.Init(inputManager, playerTank.transform); instructionManager.SetCamera(playerCamera); crosshairManager.Init(playerTank.motion.tankComponents, playerCamera.GetComponentInChildren <Camera>()); statManager.AddTank(playerTank); mainGameUI.Init(statManager.GetAllStats()[0]); playerTank.UpdateTankInfo(); serverUIController.Init(); sensoringSimulator.Init(Players); }