public void UpdateParameter()
        {
            if (parameterInterface == null)
            {
                return;
            }

            if (parameterInterface.ParameterState != ContractState.Complete)
            {
                for (int i = parameters.Count - 1; i >= 0; i--)
                {
                    CW_ParameterSection param = parameters[i];

                    if (param == null)
                    {
                        return;
                    }

                    param.UpdateParameter();
                }
            }

            if (ParameterText == null || ParameterRewardText == null || ParameterPenaltyText == null)
            {
                return;
            }

            ParameterText.OnTextUpdate.Invoke(parameterInterface.TitleText);

            ParameterRewardText.OnTextUpdate.Invoke(parameterInterface.RewardText);

            ParameterPenaltyText.OnTextUpdate.Invoke(parameterInterface.PenaltyText);
        }
Ejemplo n.º 2
0
        public void UpdateContract()
        {
            if (contractInterface == null)
            {
                return;
            }

            if (contractInterface.ShowParams)
            {
                for (int i = parameters.Count - 1; i >= 0; i--)
                {
                    CW_ParameterSection param = parameters[i];

                    if (param == null)
                    {
                        return;
                    }

                    param.UpdateParameter();
                }
            }

            if (ContractTitle == null || ContractRewardText == null || ContractPenaltyText == null)
            {
                return;
            }

            ContractTitle.OnTextUpdate.Invoke(contractInterface.ContractTitle);

            ContractRewardText.OnTextUpdate.Invoke(contractInterface.RewardText);

            ContractPenaltyText.OnTextUpdate.Invoke(contractInterface.PenaltyText);
        }