MissionRound CreateMissionRound(Dictionary <string, object> roundData) { MissionRound mr = null; if (_playerType == GameMode.Shooter) { mr = new ShooterMissionRound(roundData); } else if (_playerType == GameMode.GoalKeeper) { mr = new GoalkeeperMissionRound(roundData); } return(mr); }
void StartPlay() { InputManager.instance.Blocked = false; if (GameplayService.networked) { gpService.SwitchGameMode(); } var config = ServiceLocator.Request <IDifficultyService>().GetNextShotConfig(); if (playingGoalKeeper) { GoalCamera.instance.stateMachine.changeState = GoalKeeperCameraStates.Init.instance; } else { GoalCamera.instance.stateMachine.changeState = ThrowerCameraStates.Init.instance; } kickEffects.instance.ShowRect(); Vector3 pos = config.Position; playOnCourse = true; if (MissionManager.instance.HasCurrentMission()) { MissionRound mr = MissionManager.instance.GetMission().GetRoundInfo(); if (mr.HasPopUp()) { Debug.Log("PopUp: " + mr.GetPopUp().MessageID); Tutorial.instance.ThrowTuto(mr.GetPopUp().MessageID); } else { Tutorial.instance.DeactivateTutorial(); } } // en modo duelo => ocultar la pastilla del tutorial if (GameplayService.networked) { Tutorial.instance.DeactivateTutorial(); } BallPhysics.instance.Prepare(pos + new Vector3(0, .1f, 0)); Destroy(Thrower.instance.gameObject); SpawnThrower(); if (Goalkeeper.instance) { Goalkeeper.instance.Reset(); } Porteria.instance.SetKeeperMaterial(playingGoalKeeper); if (gpService.GetAuto()) { Auto_Thrower.instance.Ready(); } if (!GameplayService.IsGoalkeeper() && GameplayService.networked) { Debug.Log(">>> DESDE AQUI SE LANZA EL CRONOMETRO"); cntCuentaAtras.instance.Activar( // accion a realizar si se termina el tiempo (_name) => { InputManager.instance.Blocked = true; InputManager.instance.SendShotInfo(Auto_Thrower.GetRandomFail()); }); } Thrower.instance.SetPositionFor(ball.transform.position); Tutorial.instance.EnableTutorial(); ifcThrower.instance.UpdateHabilidades(); }