예제 #1
0
        private void LoadGameSession(IServicesInjector services)
        {
            var gameSession = services.Get <IGameSession>();

            if (gameCharacterPrefab == null)
            {
                gameCharacterPrefab = gameSession.PrefabToSpawn;
            }

            CurrentCharacter = Instantiate(gameCharacterPrefab, transform, false);
            CurrentCharacter.transform.position = transformData.position;
            CurrentCharacter.transform.rotation = transformData.rotation;
            CurrentCharacter.SetupData(gameSession.InstanceData, services);
            transformData.gameObject.SetActive(false);
        }
예제 #2
0
 public override void EarlyInitialization(IServicesInjector gamePlayServices)
 {
     Camera       = gamePlayServices.Get <ICameraBinder>().GetCamera();
     PlayerBinder = gamePlayServices.Get <IPlayerBinder>();
 }
예제 #3
0
 public override void EarlyInitialization(IServicesInjector gamePlayServices)
 {
     model = gamePlayServices.Get <IPlayerAnimatorModel>();
 }
 public override void EarlyInitialization(IServicesInjector gamePlayServices)
 {
     PlayerAimHelper = gamePlayServices.Get <IPlayerAimHelper>();
     model           = gamePlayServices.Get <IPlayerMovementModel>();
     //rb = gamePlayServices.Get<PlayerBinder>().Rigidbody;
 }