// Use this for initialization void Start() { GetSetting(); TransformSettings.Add(this); if (!Added) { KeyEventManager.AddEvent(KeyEventName, code, SetSettings); } }
void Awake() { Objects.Add(this); KeyEventName = KeyEventName == ""? keyEventName:KeyEventName; if (!KeyEventManager.HasEventOfName(KeyEventName)) { KeyEventManager.AddEvent(KeyEventName, KeyCode.D, ToggleShow); } }
void Awake() { if (_instance != null) { Destroy(gameObject); } else { _instance = this; } DontDestroyOnLoad(gameObject); AddEvent("KeyHelper", KeyCode.H, ToggleHelp); windowID = WindowIDManager.ID; }
private bool checkIfShown() { int eventsCount = eventsToCheck.Length; int eventBoolsCount = showIfEventTriggered.Length; KeyEventManager keyEventManager = FindObjectOfType <KeyEventManager>(); bool show = true; for (int i = 0; i < eventsCount; i++) { bool triggered = keyEventManager.isEventTriggered(eventsToCheck[i]); Debug.Log("will check event " + eventsToCheck[i]); if (i < eventBoolsCount) //this is to prevent crashing if the boolList is shorter than the eventList { show = triggered == showIfEventTriggered[i]; } else { show = triggered; } Debug.Log("show set to " + show); } return(show); }
void Start() { KeyEventManager.AddEvent("ShowSettingWindow", KeyCode.S, ToggleSettingList); }
void Awake() { if(_instance != null) Destroy(gameObject); else _instance = this; DontDestroyOnLoad(gameObject); AddEvent("KeyHelper", KeyCode.H, ToggleHelp); windowID = WindowIDManager.ID; }