public PopUpConstArg( IUIManager uim, IUISystemProcessFactory processFactory, IUIElementFactory uiElementFactory, IPopUpAdaptor popUpAdaptor, IUIImage image, ActivationMode activationMode, IPopUpManager popUpManager, bool hidesOnTappingOthers, PopUpMode popUpMode ) : base( uim, processFactory, uiElementFactory, popUpAdaptor, image, activationMode ) { thisPopUpManager = popUpManager; thisHidesOnTappingOthers = hidesOnTappingOthers; thisPopUpMode = popUpMode; }
void Start() { gameManager = interfaceFactory.GameManager; globeManager = interfaceFactory.GlobeManager; uiManager = interfaceFactory.UIManager; errorHandler = interfaceFactory.ErrorHandler; if (gameManager == null || globeManager == null || uiManager == null || errorHandler == null) { gameObject.SetActive(false); } else { if (componentMissing) { errorHandler.ReportError("Mouse Cell Enterer missing component", ErrorState.restart_scene); } worldMapGlobe = globeManager.WorldMapGlobe; if (worldMapGlobe == null) { errorHandler.ReportError("World Map Globe missing", ErrorState.restart_scene); } try { globeManager.WorldMapGlobe.OnCellEnter += HandleOnCellEnter; } catch (System.Exception ex) { errorHandler.CatchException(ex, ErrorState.restart_scene); } } }
void Start() { errorHandler = interfaceFactory.ErrorHandler; gameManager = interfaceFactory.GameManager; globeManager = interfaceFactory.GlobeManager; uiManager = interfaceFactory.UIManager; if (errorHandler == null || gameManager == null || globeManager == null || uiManager == null) { gameObject.SetActive(false); } else { if (componentMissing == true) { errorHandler.ReportError("Pathfinder missing component", ErrorState.restart_scene); } globeParser = globeManager.GlobeParser; if (globeParser == null) { errorHandler.ReportError("Globe Parser missing", ErrorState.restart_scene); } worldMapGlobe = globeManager.WorldMapGlobe; if (worldMapGlobe == null) { errorHandler.ReportError("World Map Globe missing", ErrorState.restart_scene); } playerManager = gameManager.PlayerManager; if (playerManager == null) { errorHandler.ReportError("Player Manager missing", ErrorState.restart_scene); } CellsInRange = globeParser.GetCellsInRange(playerCharacter.CellLocation, TravelRange + 1); } }
public TestItemIcon CreateTestItemIcon(out IItemIconConstArg arg) { IItemIconConstArg thisArg = Substitute.For <IItemIconConstArg>(); IUIManager uim = Substitute.For <IUIManager>(); thisArg.uim.Returns(uim); IItemIconUIAdaptor iiUIA = Substitute.For <IItemIconUIAdaptor>(); thisArg.uia.Returns(iiUIA); IItemIconImage itemIconImage = Substitute.For <IItemIconImage>(); thisArg.image.Returns(itemIconImage); IItemIconTransactionManager iiTAM = Substitute.For <IItemIconTransactionManager>(); thisArg.iiTAM.Returns(iiTAM); IUIItem item = Substitute.For <IUIItem>(); thisArg.item.Returns(item); IItemIconTransactionStateEngine iiTAStateEngine = Substitute.For <IItemIconTransactionStateEngine>(); thisArg.iiTAStateEngine.Returns(iiTAStateEngine); IItemIconEmptinessStateEngine emptinessStateEngine = Substitute.For <IItemIconEmptinessStateEngine>(); thisArg.emptinessStateEngine.Returns(emptinessStateEngine); ITransferabilityHandlerImplementor transferabilityHandlerImplementor = Substitute.For <ITransferabilityHandlerImplementor>(); thisArg.transferabilityHandlerImplementor.Returns(transferabilityHandlerImplementor); TestItemIcon testItemIcon = new TestItemIcon(thisArg); arg = thisArg; return(testItemIcon); }
//unity private void Start() { //set init values difficulty = 1; #if UNITY_WEBGL && !UNITY_EDITOR float sensitivity = 0.55f; #else float sensitivity = 0.5f; #endif bool sound = false; //setup control #if UNITY_ANDROID && !UNITY_EDITOR control = gameObject.AddComponent <GyroControl>(); uiManager = new UIWithTaps(UIManagerFactory.getInstance().CreateBig()); #else control = gameObject.AddComponent <SliderControl>(); // uiManager = new UIWithKeyHandler(UIManagerFactory.getInstance().Create()); uiManager = new UIWithTaps(UIManagerFactory.getInstance().CreateBig()); #endif control.SetSensitivity(sensitivity); //setup physics physics = new GamePhysics(); physics.SetDifficulty(difficulty); //setup score score = new GameScore(); score.SetDifficulty(difficulty); uiManager.onMenuCommand += OnMenuCommand; uiManager.Initialize(difficulty, sound, sensitivity); //uiManager.MakeFlexible(true); soundManager.Play(sound); PauseGame(true); }
public static void ClassInitialization(TestContext ctx) { manager = new UIManager(); renderer = new Mock <IRenderer>(); inputReader = new Mock <IUserInputReader>(); mockedManager = new UIManager(renderer.Object, inputReader.Object); }
public void Init() { _loadObjectsManager = GameClient.Get <ILoadObjectsManager>(); _uiManager = GameClient.Get <IUIManager>(); _abilities = new List <AbilityInstance>(); }
public ScrollerConstArg( ScrollerAxis scrollerAxis, Vector2 relativeCursorPosition, Vector2 rubberBandLimitMultiplier, bool isEnabledInertia, float newScrollSpeedThreshold, IUIManager uim, IUISystemProcessFactory processFactory, IUIElementFactory uieFactory, IScrollerAdaptor uia, IUIImage uiImage, ActivationMode activationMode ) : base( uim, processFactory, uieFactory, uia, uiImage, activationMode ) { thisScrollerAxis = scrollerAxis; thisRelativeCursorPos = relativeCursorPosition; thisRubberBandLimitMultiplier = rubberBandLimitMultiplier; thisIsEnabledInertia = isEnabledInertia; thisNewScrollSpeedThreshold = newScrollSpeedThreshold; }
public GameStateDungeonGame(Game game, IUIManager ui) : base(CreateDrawingService(game)) { this.ui = ui; gd = new DungeonGameData(); var contentLoader = new MonoGameContentLoader(game.Content); var textureOps = new MonoGameTextureOperations(game.GraphicsDevice); var tileProducer = new MonoGameTileProducer(textureOps); var renderFactory = new DefaultGameRenderCallbackFactory <Nothing>(game); var tileSet = new DungeonTileSet <MonoGameTile, XnaTexture, XnaRawTexture>(contentLoader, tileProducer); var config = new GameRenderingConfig(RenderType.IsoDiamond, new Range(0, gd.Map.Width), new Range(0, gd.Map.Height)); var grf = new DungeonGameRenderingFactory <MonoGameTile>(config, gd, tileSet); gameRendering = new GameRendering(game, grf.RenderingConfig, grf.RenderControl); gameRendering.AddLayers(grf.Create(renderFactory, Nothing.Instance, Nothing.Instance)); gameRendering.TrackScreenSize(); gameRendering.DrawOrder = -10; overlay = new DebugOverlayRenderer(game) { DrawOrder = -5 }; var navigationUI = new NavigationUI(ui, gameRendering); rootComponent = navigationUI.RootComponent; }
public void Init() { _loadObjectsManager = GameClient.Get <ILoadObjectsManager>(); _uiManager = GameClient.Get <IUIManager>(); Hide(); }
protected override void Awake() { base.Awake(); gameState = Engine.GetService <IStateManager>(); uiManager = Engine.GetService <IUIManager>(); }
public GameStateInitialSelection(Game game, INamedStateManager stateService, IUIManager uiManager) : base(CreateDrawingService(game)) { this.stateService = stateService; uiManager.Root.Content = CreateContent(uiManager.UIStyle); }
public TowerController() { _gameManager = GameClient.Get <IGameManager>(); _uiManager = GameClient.Get <IUIManager>(); _towerSlotMaskLayerIndex = LayerMask.GetMask("TowerSlot"); }
public override void Init() { Debug.Log("Init UIModuleManager"); concreteUIManager = new UGuiUIManager(); concreteUIManager.Init(); }
public static void SetupStyles(IUIManager manager) { var styleSystem = manager.UIStyle; styleSystem.StyleResolver.StyleRules.AddRange(styleSystem.LoadStyles("Content/UI/Metro/style.xml", "UI/Metro")); styleSystem.StyleResolver.StyleRules.AddRange(styleSystem.LoadStyles("Content/UI/extra-style.xml", "UI")); }
public static void ClassInitialization(TestContext ctx) { manager = new UIManager(); renderer = new Mock<IRenderer>(); inputReader = new Mock<IUserInputReader>(); mockedManager = new UIManager(renderer.Object, inputReader.Object); }
private void Start() { gameManager = interfaceFactory.GameManager; errorHandler = interfaceFactory.ErrorHandler; uiManager = interfaceFactory.UIManager; if (gameManager == null || errorHandler == null || uiManager == null) { gameObject.SetActive(false); } else { touristManager = gameManager.TouristManager; if (touristManager == null) { errorHandler.ReportError("Tourist Manager missing", ErrorState.restart_scene); } inventoryUI = uiManager.InventoryUI; if (inventoryUI == null) { errorHandler.ReportError("Inventory UI missing", ErrorState.restart_scene); } started = true; } }
public ShopItemView(Transform content, Building scriptObj) { if (_prefab == null) { _prefab = Resources.Load <GameObject>("Prefabs/UI/ShopItem"); } _uiManager = GameClient.Get <IUIManager>(); _settingsManager = GameClient.Get <ISettingsManager>(); _buildManager = GameClient.Get <IBuildManager>(); transform = MonoBehaviour.Instantiate(_prefab, content).transform; _scriptObj = scriptObj; _itemImage = transform.Find("ItemImage").GetComponent <Image>(); _itemName = transform.Find("ItemName").GetComponent <Text>(); _itemDescription = transform.Find("DescriptionText").GetComponent <Text>(); _itemButton = transform.Find("ItemImage").GetComponent <Button>(); _descriptionButton = transform.Find("DescriptionButton").GetComponent <Button>(); _descriptionOutButton = transform.Find("DescriptionText").GetComponent <Button>(); _itemButton.onClick.AddListener(OnItemClickHandler); _descriptionButton.onClick.AddListener(DescriptionOnClickHandler); _descriptionOutButton.onClick.AddListener(DescriptionOutOnClickHandler); _itemImage.sprite = scriptObj.Icon; _itemName.text = scriptObj.BuildingName; _itemDescription.text = scriptObj.Description; }
public UIElementGroupConstArg( int columnCountConstraint, int rowCountConstraint, bool topToBottom, bool leftToRight, bool rowToColumn, IUIManager uim, IUISystemProcessFactory processFactory, IUIElementFactory uieFactory, IUIElementGroupAdaptor uia, IUIImage image, ActivationMode activationMode ) : base( uim, processFactory, uieFactory, uia, image, activationMode ) { thisColumnCountConstraint = columnCountConstraint; thisRowCountConstraint = rowCountConstraint; thisTopToBottom = topToBottom; thisLeftToRight = leftToRight; thisRowToColumn = rowToColumn; }
/// <summary> /// 游戏框架组件初始化。 /// </summary> protected override void Awake() { base.Awake(); m_UIManager = GameFrameworkEntry.GetModule <IUIManager>(); if (m_UIManager == null) { Log.Fatal("UI manager is invalid."); return; } if (m_EnableOpenUIFormSuccessEvent) { m_UIManager.OpenUIFormSuccess += OnOpenUIFormSuccess; } m_UIManager.OpenUIFormFailure += OnOpenUIFormFailure; if (m_EnableOpenUIFormUpdateEvent) { m_UIManager.OpenUIFormUpdate += OnOpenUIFormUpdate; } if (m_EnableOpenUIFormDependencyAssetEvent) { m_UIManager.OpenUIFormDependencyAsset += OnOpenUIFormDependencyAsset; } if (m_EnableCloseUIFormCompleteEvent) { m_UIManager.CloseUIFormComplete += OnCloseUIFormComplete; } }
public void Init() { _loadObjectsManager = GameClient.Get <ILoadObjectsManager>(); _uiManager = GameClient.Get <IUIManager>(); _battleFlavorLines = JsonConvert.DeserializeObject <BattleFlavorLines>( _loadObjectsManager.GetObjectByPath <TextAsset>("Data/battle_flavor_1").text); }
public void Dispose() { _configManager.RemovePropertyChangeListener(OnEvent_ConfigManager_PositionChange); var chatLocation = _overlay.Location; _configManager.SetProperty("behaviour.frame.chat.position.x", chatLocation.X); _configManager.SetProperty("behaviour.frame.chat.position.y", chatLocation.Y); var chatSize = _overlay.Size; _configManager.SetProperty("behaviour.frame.chat.size.width", chatSize.Width); _configManager.SetProperty("behaviour.frame.chat.size.height", chatSize.Height); _manager.UISynchronizer.RunSync(() => _overlay.Close()); _manager.DisposeUIElement(OverlayUIId); _moveCallback.Dispose(); _resizeCallback.Dispose(); _manager = null; _overlay = null; _configManager = null; _moveCallback = null; _resizeCallback = null; }
protected override void Awake() { base.Awake(); uiManager = Engine.GetService <IUIManager>(); confirmationUI = uiManager.GetUI <IConfirmationUI>(); }
public OutlookProcessor() : base(null, false) { _tracer = new Tracer("OutlookProcessor"); try { OutlookSession.Init(this); OnSettingsChanged(null, null); IdlePeriod = Settings.IdlePeriod * 60000; ThreadName = "Outlook AsyncProcessor"; ThreadPriority = ThreadPriority.Normal; ThreadStarted += new EventHandler(_outlookProcessor_ThreadStarted); ThreadFinished += new EventHandler(_outlookProcessor_ThreadFinished); ProcessMessages = true; ExceptionHandler = new AsyncExceptionHandler(HandleException); _UIManager = Core.UIManager; _UIManager.RegisterIndicatorLight("Outlook", this, 10, OutlookPlugin.LoadIconFromAssembly("OutlookPlugin.Icons.outlook_idle.ico"), OutlookPlugin.LoadIconFromAssembly("OutlookPlugin.Icons.outlook_busy.ico"), OutlookPlugin.LoadIconFromAssembly("OutlookPlugin.Icons.outlook_stuck.ico")); _UIManager.MainWindowClosing += new System.ComponentModel.CancelEventHandler(_UIManager_MainWindowClosing); StartThread(); _inited = true; } catch (Exception exception) { SetLastException(exception); } }
public IconGroupConstArg( IUIManager uim, IPickUpSystemProcessFactory pickUpSystemProcessFactory, IPickUpSystemUIElementFactory pickUpSystemUIElementFactory, IPickUpSystemUIA pickUpSyatemUIA, IUIImage image, IUITool tool, IItemIconTransactionManager iiTAM, int minSize, int maxSize, IHoverPadsManager hoverPadsManager, List <IItemIcon> iis ) : base( uim, pickUpSystemProcessFactory, pickUpSystemUIElementFactory, image, pickUpSyatemUIA, ActivationMode.None ) { thisIITAM = iiTAM; thisMinSize = minSize; thisMaxSize = maxSize; thisHoverPadsManager = hoverPadsManager; thisIIs = iis; }
public void Start() { if (!errorUIAwake) { Awake(); } //Get External Interfaces errorHandler = interfaceFactory.ErrorHandler; uiManager = interfaceFactory.UIManager; //UI Manager is optional if (errorHandler == null) { gameObject.SetActive(false); } else { if (componentMissing) { errorHandler.EmergencyExit("Error UI component missing"); } else { errorUIStarted = true; } } }
public UserInterface(VendingMachine vendingMachine, IDataManager dataManager, IUIManager uiManager) { this.vendingMachine = vendingMachine; this.dataManager = dataManager; this.uiManager = uiManager; dataManager.WriteTransaction(new VendingMachineTransaction(TransactionType.MachineStart), vendingMachine.CurrentBalance); }
public QuantityRollerConstArg( IUIManager uim, IUISystemProcessFactory processFactory, IUIElementFactory uiElementFactory, IQuantityRollerAdaptor quaRolAdaptor, IUIImage image, int maxQuantity, Vector2 panelDim, Vector2 padding, Vector2 rollerNormalizedPos ) : base( uim, processFactory, uiElementFactory, quaRolAdaptor, image, ActivationMode.None ) { thisMaxQuantity = maxQuantity; thisUIEFactory = uieFactory; thisPanelDim = panelDim; thisPadding = padding; thisRollerNormalizedPos = rollerNormalizedPos; }
public override void Stop() { UIManager = null; windowService.MouseVisible = false; base.Stop(); }
public XnaUITextBox(IUIManager uiManager, Rectangle rectangle, ILayoutView layoutView, Action <string> onTextChange) { UIManager = uiManager; Rectangle = rectangle; LayoutView = layoutView; OnTextChange = onTextChange; }
public void Init() { _dataManager = GameClient.Get <IDataManager>(); _uiManager = GameClient.Get <IUIManager>(); _playerPrefab = Resources.Load("Prefabs/Player") as GameObject; IntVector2 pos = _dataManager.GameBalanceData.Game.GetGridSize(); _playerDefaultPosition = new Vector2(Mathf.FloorToInt(pos.x / 2f), 0); _player = SpawnPlayer(_playerDefaultPosition); // player movement _playerMovement = new PlayerMovement(); _playerMovement.Init(_player); // player shooting _playerShooting = new PlayerShooting(); _playerShooting.Init(_player); // player life int playerLife = _dataManager.GameBalanceData.Game.GetPlayerLife(); _life = new Life(playerLife); }
public KeyBoardEventArgs(KeyCode key, bool keyDown, bool keyUp) { Key = key; KeyDown = keyDown; KeyUp = keyUp; uiManager = ManagerResolver.Resolve<IUIManager>(); selectedManager = ManagerResolver.Resolve<ISelectedManager>(); }
public _Support(Game game) : base(game) { _game = game; _Input = Game.Services.GetService<IInputState>(); _UserInterface = Game.Services.GetService<IUIManager>(); _World = game.Services.GetService<IIsometricRenderer>(); EngineVars.EngineRunning = true; EngineVars.InWorld = false; }
public BaseScene(Game game, bool needsUIService) { _game = game; _clearColor = Color.Black; _content = new ContentManager(_game.Services); _content.RootDirectory = "Content"; _sceneState = SceneState.TransitioningOn; _sceneService = game.Services.GetService<ISceneService>(true); _inputService = game.Services.GetService<IInputState>(true); _worldService = game.Services.GetService<IIsometricRenderer>(true); _uiService = game.Services.GetService<IUIManager>(); }
/// <summary> /// Initializes a new instance of the <see cref="Minesweeper.Game.MinesweeperGame"/> class. /// </summary> /// <param name="uiManager">The <see cref="Minesweeper.Game.IUIManager"/> implementation used to read and write.</param> public MinesweeperGame(IUIManager uiManager) { this.minefieldRows = 5; this.minefieldCols = 10; this.uiManager = uiManager; this.prompt = Messages.EnterRowCol; this.scoreBoard = new ScoreBoard(); // Show game this.uiManager.DisplayIntro(Messages.Intro); this.uiManager.DrawTable(this.minefieldRows, this.minefieldCols); this.GenerateMinefield(); }
public ReactBridgeImpl( IReactAssemblyProvider assemblyProvider, IModuleLoader moduleLoader, IJavaScriptExecutor executor, IUIManager uiManager) { _assemblyProvider = assemblyProvider; _moduleLoader = moduleLoader; _executor = executor; _uiManager = uiManager; _timer = new Timer(16.67); // _timer = new Timer(5000); _timer.Elapsed += (e, a) => { PollQueue(); }; }
public Cursor(IUIManager manager) { _manager = manager; }
private const decimal MinesCountCoeficient = 0.16m; // 0.2m -> 10 mines; 0.16m -> 8 mines /// <summary> /// Initializes a new instance of the <see cref="Minesweeper.Game.MinesweeperGameEasy"/> class. /// </summary> /// <param name="uiManager">The <see cref="Minesweeper.Game.IUIManager"/> implementation used to read and write.</param> public MinesweeperGameEasy(IUIManager uiManager) : base(uiManager) { }
public ReactRootViewModel(IUIManager uiManager, IReactBridge bridge) { _bridge = bridge; uiManager.RegisterRootView(this); }
public SceneManager(Game game) : base(game) { _ui = Game.Services.GetService<IUIManager>(true); _ui.AddRequestLogoutNotifier(uiRequestsLogout); }
public static void Initialize(Game game) { _inputNew = game.Services.GetService<IInputState>(); _world = game.Services.GetService<IIsometricRenderer>(); _ui = game.Services.GetService<IUIManager>(); }
public KeyBoardEventArgs(KeyCode key) { Key = key; uiManager = ManagerResolver.Resolve<IUIManager>(); selectedManager = ManagerResolver.Resolve<ISelectedManager>(); }
public static void Initialize(Game game) { _worldService = game.Services.GetService<TileEngine.IIsometricRenderer>(); _LegacyUI = game.Services.GetService<IUIManager>(); }
public QueueContent(Rect area, Building building) { m_Host = building; CalculateSize (area); m_UIManager = ManagerResolver.Resolve<IUIManager>(); }