private void OnEnable() { ComputeIndexes(); if (!UnityEngineUtils.IsInPlayModeOrAboutToPlay()) { return; } isAssistMode.OnChange += OnAssistModeChange; currentTiers.OnStatsChangeEvent -= OnStatsChanged; }
private void OnDisable() { if (!UnityEngineUtils.IsInPlayModeOrAboutToPlay()) { return; } currentPlayerStats.OnChangeEvent -= OnStatsChange; currentProjectileStats.OnChangeEvent -= OnStatsChange; GameTime.Instance.RemoveTimeListener(this); }
public override void OnInspectorGUI() { base.OnInspectorGUI(); if (UnityEngineUtils.IsInPlayModeOrAboutToPlay() && GUILayout.Button("Test Use")) { //actionUI.AnimateTurnActions(() => //{ //}); } }
private void OnEnable() { if (!UnityEngineUtils.IsInPlayModeOrAboutToPlay()) { return; } GameTime.Instance.AddTimeListener(this); currentPlayerStats.OnChangeEvent += OnStatsChange; currentProjectileStats.OnChangeEvent += OnStatsChange; playerStats = new TimelinedProperty <TimedFloat, float> [(int)StatsIndex.End]; for (int i = 0; i < playerStats.Length; i++) { playerStats[i] = new TimelinedProperty <TimedFloat, float>(); } }