private void Awake() { ComponentLocator.Resolve <Updater>().Register(UpdateType.Late, this); cachedTransform = transform; IsEnabled = target != null; }
private void CreateFPSCounter() { var windowsManager = ComponentLocator.Resolve <WindowsManager>(); windowsManager.CreateWindow <GameLoadingWindow>(GameLoadingWindow.prefabPath, Enums.EnumWindowsLayer.Loading); windowsManager.CreateWindow <FPSWindow>(FPSWindow.prefabPath, Enums.EnumWindowsLayer.Special); }
public void OnClickTest() { var windowsManager = ComponentLocator.Resolve <WindowsManager.WindowsManager>(); windowsManager.CreateWindow <TestShootingWindow>(TestShootingWindow.prefabPath, Enums.EnumWindowsLayer.Main); Close(); }
public void OnClickTest2() { var windowsManager = ComponentLocator.Resolve <WindowsManager.WindowsManager>(); windowsManager.CreateWindow <SpaceShipTestWindow>(SpaceShipTestWindow.prefabPath, Enums.EnumWindowsLayer.Main); Close(); }
private void Awake() { cachedTransform = transform; pitch = startRotationAngle.x; yaw = startRotationAngle.y; currentRotation = startRotationAngle; ComponentLocator.Resolve <Updater>().Register(UpdateType.Default, this); }
public GameplayCameraStandaloneAdapter(bool _enabled) : base(_enabled) { EventManager.AddEventListener(ConstantEventsName.ON_GAMEPLAY_CAMERA_ENABLE, OnGameplayCameraEnableHandler); camera = ComponentLocator.Resolve <GameplayCameraController>(); if (camera == null) { SetEnable(false); } }
public SpaceshipControlEditorAdapter(bool _enabled) : base(_enabled) { EventManager.AddEventListener(ConstantEventsName.ON_PLAYER_SPACESHIP_CREATE, OnPlayerSpaceshipCreateHandler); EventManager.AddEventListener(ConstantEventsName.ON_PLAYER_SPACESHIP_DESTROY, OnPlayerSpaceshipDestroyHandler); playerSpaceship = ComponentLocator.Resolve <PlayerSpaceship>(); if (playerSpaceship == null) { SetEnable(false); } }
private void OnGameplayCameraEnableHandler(CustomEvent _event) { var state = (bool)_event.EventData; if (state && camera == null) { camera = ComponentLocator.Resolve <GameplayCameraController>(); } SetEnable(state); }
public override void Initialize(object _data) { //sceneName = (string)_data; //var operation = SceneManager.LoadSceneAsync(sceneName); //StartCoroutine(UpdateProgress(operation)); var windowsManager = ComponentLocator.Resolve <WindowsManager.WindowsManager>(); mainMenu = windowsManager.CreateWindow <MainMenuWindow>(MainMenuWindow.prefabPath, Enums.EnumWindowsLayer.Main); mainMenu.OnInitialize += OnInitializeHandler; base.Initialize(_data); }
public override void Initialize(object _data) { data = _data; if (gameManager.CheckCurrentScene(ConstantScenes.SPACE_TEST)) { base.Initialize(_data); } else { var windowsManager = ComponentLocator.Resolve <WindowsManager.WindowsManager>(); loadingWindow = windowsManager.CreateWindow <SceneLoadingWindow>(SceneLoadingWindow.prefabPath, Enums.EnumWindowsLayer.Loading, ConstantScenes.SPACE_TEST); loadingWindow.OnSceneLoaded += OnSceneLoadedHandler; } }
private void Create3DUIWindows(PlayerSpaceship _playerSpaceship) { var windowsManager = ComponentLocator.Resolve <WindowsManager.WindowsManager>(); uiWindow = windowsManager.CreateWindow <SpaceShipTest3DUIWindow>(SpaceShipTest3DUIWindow.prefabPath, Enums.EnumWindowsLayer.World, _playerSpaceship, false); }
protected override void CustomClose(bool _result) { var windowsManager = ComponentLocator.Resolve <WindowsManager.WindowsManager>(); windowsManager.CreateWindow <MainMenuWindow>(MainMenuWindow.prefabPath, Enums.EnumWindowsLayer.Main); }
//TODO private void Initialize() { var windowsManager = ComponentLocator.Resolve <WindowsManager>(); windowsManager.CreateWindow <GameLoadingWindow>(GameLoadingWindow.prefabPath, Enums.EnumWindowsLayer.Loading, ConstantScenes.MAIN_MENU); }
private void Awake() { var windowsManager = ComponentLocator.Resolve <WindowsManager>(); windowsManager.CreateWindow <MainMenuWindow>(MainMenuWindow.prefabPath, Enums.EnumWindowsLayer.Main); }
private void Awake() { cachedTransform = transform; ComponentLocator.Resolve <Updater>().Register(UpdateType.Default, this); }
private void OnDestroy() { ComponentLocator.Resolve <Updater>().Delete(UpdateType.Default, this); ComponentLocator.Resolve <Updater>().Delete(UpdateType.Late, this); }
private void Awake() { joystick = GetComponent <Joystick>(); adapter = (SpaceshipControlMobileAdapter)ComponentLocator.Resolve <InputController>()?.GetAdapter(Enums.EnumInputAdapters.SpaceshipControl); }