Exemplo n.º 1
0
 public CSceneManager()
 {
     this._fader = CDependencyResolver.Get <CFader>();
     this._blockingEventsManager      = CDependencyResolver.Get <CBlockingEventsManager>();
     LoadedSceneThisFrame             = false;
     SceneManager.activeSceneChanged += ActiveSceneChanged;
 }
Exemplo n.º 2
0
        public CGamePlayer(int playerNumber)
        {
            this._gameSettings          = CDependencyResolver.Get <CGameSettings>();
            this._blockingEventsManager = CDependencyResolver.Get <CBlockingEventsManager>();
            this._navigationManager     = CDependencyResolver.Get <CUINavigationManager>();

            this._compositeDisposable?.Dispose();
            this._compositeDisposable = new CompositeDisposable();

            this.PlayerNumber = playerNumber;

                        #if Rewired
            this._rePlayer = ReInput.players.GetPlayer(this.PlayerNumber);
                        #endif

            this.SignToInputEvents();

                        #if Rewired
            SetInputLayout(this._rePlayer, false);
            this._blockingEventsManager.OnMenu += this.SetInputLayout;
                        #endif

            if (!Application.isEditor)
            {
                Application.focusChanged += focused => {
                    if (!focused)
                    {
                        this.OpenMenu();
                    }
                };
            }

            Debug.Log($"Instantiating a new game player number {playerNumber}");
        }
Exemplo n.º 3
0
 protected virtual void Awake()
 {
     this._blockingEventsManager = CDependencyResolver.Get <CBlockingEventsManager>();
     if (this._playableDirector.extrapolationMode != DirectorWrapMode.None)
     {
         Debug.LogError($"PlayableDirector {this._playableDirector.name} extrapolationMode must be set to None.");
     }
 }
Exemplo n.º 4
0
        public CCursorManager()
        {
            this._gameSettings          = CDependencyResolver.Get <CGameSettings>();
            this._blockingEventsManager = CDependencyResolver.Get <CBlockingEventsManager>();

            SetCursorState(!this._gameSettings.CursorStartsHidden);
            this._blockingEventsManager.OnMenu += SetCursorState;
            CInputManager.InputTypeChanged     += OnInputTypeChanged;
        }
Exemplo n.º 5
0
        private void Awake()
        {
            this._transform               = this.transform;
            this._fader                   = CDependencyResolver.Get <CFader>();
            this._blockingEventsManager   = CDependencyResolver.Get <CBlockingEventsManager>();
            this.ActiveCameraProfiles     = new List <CCameraProfileVolume>();
            this._isCloseToTheCharacterRx = new ReactiveProperty <bool>(false);

            this.SearchForGlobalVolume();
            this.ApplyLastOrDefaultCameraProfile();
        }
Exemplo n.º 6
0
        private void Awake()
        {
            this._blockingEventsManager = CDependencyResolver.Get <CBlockingEventsManager>();
            this._transform             = this.transform;

            this._characterBase = this.GetComponent <CCharacterBase>();
            if (this._characterBase == null)
            {
                Debug.LogError($"Cant find any Character on {this.name}, removing component, character cannot interact with anything!");
                Destroy(this);
            }
        }
Exemplo n.º 7
0
        private static void InitializeDependencyContainerAndBinds()
        {
            CDependencyResolver.Bind <CGameSettings>(() => Resources.Load <CGameSettings>("GameSettings"));
            CDependencyResolver.Bind <CBlockingEventsManager>(() => new CBlockingEventsManager());
            CDependencyResolver.Bind <CUINavigationManager>(() => new CUINavigationManager());
            CDependencyResolver.Bind <CGamePlayerManager>(() => new CGamePlayerManager());

            CDependencyResolver.Bind <CCursorManager>(() => new CCursorManager());
            CDependencyResolver.Get <CCursorManager>();            // force create instance

            CDependencyResolver.Bind <CFader>(() => new CFader());

            CDependencyResolver.Bind <CSceneManager>(() => new CSceneManager());
        }
Exemplo n.º 8
0
 private void Awake()
 {
     _gamePlayerManager = CDependencyResolver.Get <CGamePlayerManager>();
 }
Exemplo n.º 9
0
 protected void Awake()
 {
     this._transform             = this.transform;
     this._initialRotation       = this._transform.rotation;
     this._blockingEventsManager = CDependencyResolver.Get <CBlockingEventsManager>();
 }
Exemplo n.º 10
0
 protected virtual void Awake()
 {
     this._blockingEventsManager = CDependencyResolver.Get <CBlockingEventsManager>();
 }
Exemplo n.º 11
0
 private void Awake()
 {
     _blockingEventsManager = CDependencyResolver.Get <CBlockingEventsManager>();
 }