protected virtual void OnClick() { FFEventParameter param = new FFEventParameter(); param.data = levelIndex; FFEngine.Events.FireEvent("RequestLevel", param); }
internal void OnRequestKeyPoll(FFEventParameter a_args) { InputBindingWidgetKey widget = a_args.data as InputBindingWidgetKey; panel.DisplayKeyPoll(widget.key.ToString()); FFEngine.Inputs.StartKeyPoll(); }
internal void DoUpdate () { foreach (AInputEvent each in keys.Values) { each.DoUpdate(); } foreach (AInputAxis each in axis.Values) { each.DoUpdate(); } if(_isPollingKey) { InputKeyBinding binding = InputKeyBinding.Current; if(binding != null) { FFEventParameter args = new FFEventParameter(); args.data = binding; FFEngine.Events.FireEvent("InputKeyDetected", args); _isPollingKey = false; } } if(_isPollingAxis) { InputControllerAxisBinding binding = InputControllerAxisBinding.Current; if(binding != null) { FFEventParameter args = new FFEventParameter(); args.data = binding; FFEngine.Events.FireEvent("InputAxisDetected", args); _isPollingAxis = false; } } }
internal void GoBack(FFEventParameter a_args) { if (navigationHistory.Count > 0 && states[CurrentStateID] is AMenuGameState) { AMenuGameState menuState = states[CurrentStateID] as AMenuGameState; menuState.GoBack(navigationHistory.Pop()); } }
internal void GoBack(FFEventParameter a_args) { if(navigationHistory.Count > 0 && states[CurrentStateID] is AMenuGameState) { AMenuGameState menuState = states[CurrentStateID] as AMenuGameState; menuState.GoBack(navigationHistory.Pop()); } }
protected override void OnClick() { popup.Hide(); FFEventParameter param = new FFEventParameter (); param.data = popup; FFEngine.Events.FireEvent (eventKey,param); }
internal void ModifyKeyCode() { FFEventParameter args = new FFEventParameter(); args.data = this; FFEngine.Events.FireEvent("RequestAxisPoll",args); FFEngine.Events.RegisterForEvent("InputAxisDetected", OnInputDetected); isRegistered = true; }
protected override void OnClick() { popup.Hide(); FFEventParameter param = new FFEventParameter(); param.data = popup; FFEngine.Events.FireEvent(eventKey, param); }
internal void ModifyKeyCode() { FFEventParameter args = new FFEventParameter(); args.data = this; FFEngine.Events.FireEvent("RequestAxisPoll", args); FFEngine.Events.RegisterForEvent("InputAxisDetected", OnInputDetected); isRegistered = true; }
internal void OnInputDetected(FFEventParameter args) { FFEngine.Events.UnregisterForEvent("InputAxisDetected", OnInputDetected); isRegistered = false; binding = args.data as InputControllerAxisBinding; _inputAxis.binding = binding; UpdateDisplay(); }
internal void FireEvent(string a_eventKey, FFEventParameter a_eventParam = null) { if (_mapping.ContainsKey (a_eventKey)) { _mapping[a_eventKey].Invoke(a_eventParam); } else { Debug.LogWarning("No event register on : " + a_eventKey); } }
internal void FireEvent(string a_eventKey, FFEventParameter a_eventParam = null) { if (_mapping.ContainsKey(a_eventKey) && _mapping[a_eventKey] != null) { _mapping[a_eventKey].Invoke(a_eventParam); } else { Debug.LogWarning("No event register on : " + a_eventKey); } }
private void OnAsyncLoadingComplete(FFEventParameter a_args) { _asyncLoadingCount--; if (_asyncLoadingCount == 0) { _isGameModeLoaded = true; } else if (_asyncLoadingCount < 0) { Debug.LogError("Async loading error, loading count invalid : " + _asyncLoadingCount.ToString()); } }
internal void OnInputDetected(FFEventParameter args) { FFEngine.Events.UnregisterForEvent("InputAxisDetected", OnInputDetected); isRegistered = false; if (args != null) { binding = args.data as InputControllerAxisBinding; _inputAxis.UpdateBinding(binding); } UpdateDisplay(); }
internal void OnInputDetected(FFEventParameter args) { FFEngine.Events.UnregisterForEvent("InputKeyDetected", OnInputDetected); isRegistered = false; InputKeyBinding newBinding = args.data as InputKeyBinding; if(newBinding.key != KeyCode.Escape) { EInputTriggerType type = binding.trigger; binding = newBinding; binding.trigger = type; } UpdateDisplay(); }
internal void OnInputDetected(FFEventParameter args) { FFEngine.Events.UnregisterForEvent("InputKeyDetected", OnInputDetected); isRegistered = false; InputKeyBinding newBinding = args.data as InputKeyBinding; if (newBinding.key != KeyCode.Escape) { EInputTriggerType type = binding.trigger; binding = newBinding; binding.trigger = type; _inputKey.UpdateBinding(binding); } UpdateDisplay(); }
internal void DoUpdate() { foreach (AInputEvent each in keys.Values) { each.DoUpdate(); } foreach (AInputAxis each in axis.Values) { each.DoUpdate(); } if (_isPollingKey) { InputKeyBinding binding = InputKeyBinding.Current; if (binding != null) { FFEventParameter args = new FFEventParameter(); args.data = binding; FFEngine.Events.FireEvent("InputKeyDetected", args); _isPollingKey = false; } } if (_isPollingAxis) { if (InputKeyBinding.IsEscapePressed()) { FFEngine.Events.FireEvent("InputAxisDetected", null); } else { InputControllerAxisBinding binding = InputControllerAxisBinding.Current; if (binding != null) { FFEventParameter args = new FFEventParameter(); args.data = binding; FFEngine.Events.FireEvent("InputAxisDetected", args); _isPollingAxis = false; } } } }
internal void OnInputDetected(FFEventParameter a_args) { panel.HidePoll(); }
internal void FireEvent(EEventType a_type, FFEventParameter a_eventParam = null) { FireEvent(a_type.ToString()); }
internal void OnNextState(FFEventParameter a_args) { RequestState(outState.ID); }
internal void OnSettingsSelected(FFEventParameter a_args) { RequestState((int)EMenuStateID.Settings); }
protected virtual void OnClick() { FFEventParameter param = new FFEventParameter (); param.data = levelIndex; FFEngine.Events.FireEvent ("RequestLevel", param); }
internal void OnRequestAxisPoll(FFEventParameter a_args) { panel.DisplayKeyPoll("Axis"); FFEngine.Inputs.StartAxisPoll(); }
private void OnUILoadingComplete(FFEventParameter a_args) { _isUILoaded = true; }
internal void OnPlaySelected(FFEventParameter a_args) { RequestGameMode("RTSGameMode"); }
private void OnAsyncLoadingComplete(FFEventParameter a_args) { _asyncLoadingCount--; if(_asyncLoadingCount == 0) { _isGameModeLoaded = true; } else if(_asyncLoadingCount < 0) { Debug.LogError("Async loading error, loading count invalid : " + _asyncLoadingCount.ToString()); } }
internal virtual void OnReset(FFEventParameter args = null) { transform.position = _basePos; transform.rotation = _baseRot; //transform.lossyScale = _baseScale; }