public void Init() { enabled = true; playerCamera = Instantiate(cameraPrefab).GetComponent <Base.CameraController>(); instructionSender.Init(Global.GameSettings.serverIPAddress, instructionManager.GetInstruction(), PhotonNetwork.player.ID); photonView.RPC("RPCOnePlayerReady", PhotonTargets.MasterClient); }
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); }