示例#1
0
    private void OnEnable()
    {
        ComputeIndexes();

        if (!UnityEngineUtils.IsInPlayModeOrAboutToPlay())
        {
            return;
        }
        isAssistMode.OnChange           += OnAssistModeChange;
        currentTiers.OnStatsChangeEvent -= OnStatsChanged;
    }
示例#2
0
    private void OnDisable()
    {
        if (!UnityEngineUtils.IsInPlayModeOrAboutToPlay())
        {
            return;
        }

        currentPlayerStats.OnChangeEvent     -= OnStatsChange;
        currentProjectileStats.OnChangeEvent -= OnStatsChange;
        GameTime.Instance.RemoveTimeListener(this);
    }
示例#3
0
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();

        if (UnityEngineUtils.IsInPlayModeOrAboutToPlay() && GUILayout.Button("Test Use"))
        {
            //actionUI.AnimateTurnActions(() =>
            //{

            //});
        }
    }
示例#4
0
    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>();
        }
    }