コード例 #1
0
        private void setup(string iname, int grid_x, int grid_y, string tag, Unit creator, int create_clock, int rank, int rankcap)
        {
            if (string.IsNullOrEmpty(iname))
            {
                return;
            }
            GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect();

            if (!UnityEngine.Object.op_Implicit((UnityEngine.Object)instanceDirect))
            {
                return;
            }
            this.mTrickParam = instanceDirect.MasterParam.GetTrickParam(iname);
            if (this.mTrickParam == null)
            {
                return;
            }
            this.mRankCap         = (OInt)Math.Max(rankcap, 1);
            this.mRank            = (OInt)Math.Min(rank, (int)this.mRankCap);
            this.mBuffEffect      = BuffEffect.CreateBuffEffect(instanceDirect.MasterParam.GetBuffEffectParam(this.mTrickParam.BuffId), (int)this.mRank, (int)this.mRankCap);
            this.mCondEffect      = CondEffect.CreateCondEffect(instanceDirect.MasterParam.GetCondEffectParam(this.mTrickParam.CondId), (int)this.mRank, (int)this.mRankCap);
            this.mCreateUnit      = creator;
            this.mGridX           = (OInt)grid_x;
            this.mGridY           = (OInt)grid_y;
            this.mTag             = tag;
            this.mRestActionCount = this.mTrickParam.ActionCount;
            this.mCreateClock     = (OInt)create_clock;
            this.mValid           = (OBool)true;
        }
コード例 #2
0
ファイル: WeatherData.cs プロジェクト: zunaalabaya/TAC-BOT
        private void setup(string iname, Unit modify_unit, int rank, int rankcap)
        {
            if (string.IsNullOrEmpty(iname))
            {
                return;
            }
            GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect();

            if (!UnityEngine.Object.op_Implicit((UnityEngine.Object)instanceDirect))
            {
                return;
            }
            this.mWeatherParam = instanceDirect.MasterParam.GetWeatherParam(iname);
            if (this.mWeatherParam == null)
            {
                return;
            }
            this.mRankCap = (OInt)Math.Max(rankcap, 1);
            this.mRank    = (OInt)Math.Min(rank, (int)this.mRankCap);
            this.mBuffEffectLists.Clear();
            using (List <string> .Enumerator enumerator = this.mWeatherParam.BuffIdLists.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    string     current    = enumerator.Current;
                    BuffEffect buffEffect = BuffEffect.CreateBuffEffect(instanceDirect.MasterParam.GetBuffEffectParam(current), rank, rankcap);
                    if (buffEffect != null)
                    {
                        this.mBuffEffectLists.Add(buffEffect);
                    }
                }
            }
            this.mCondEffectLists.Clear();
            using (List <string> .Enumerator enumerator = this.mWeatherParam.CondIdLists.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    string     current    = enumerator.Current;
                    CondEffect condEffect = CondEffect.CreateCondEffect(instanceDirect.MasterParam.GetCondEffectParam(current), rank, rankcap);
                    if (condEffect != null)
                    {
                        this.mCondEffectLists.Add(condEffect);
                    }
                }
            }
            this.mModifyUnit = modify_unit;
        }
コード例 #3
0
 public void Setup(string iname, int rank, int rankcap = 1, MasterParam master = null)
 {
     if (string.IsNullOrEmpty(iname))
     {
         this.Reset();
     }
     else
     {
         if (master == null)
         {
             master = MonoSingleton <GameManager> .GetInstanceDirect().MasterParam;
         }
         this.mSkillParam       = master.GetSkillParam(iname);
         this.mRankCap          = (int)this.mSkillParam.lvcap != 0 ? (OInt)Math.Max((int)this.mSkillParam.lvcap, 1) : (OInt)Math.Max(rankcap, 1);
         this.mRank             = (OInt)Math.Min(rank, (int)this.mRankCap);
         this.mTargetBuffEffect = BuffEffect.CreateBuffEffect(master.GetBuffEffectParam(this.SkillParam.target_buff_iname), (int)this.mRank, (int)this.mRankCap);
         this.mSelfBuffEffect   = BuffEffect.CreateBuffEffect(master.GetBuffEffectParam(this.SkillParam.self_buff_iname), (int)this.mRank, (int)this.mRankCap);
         this.mTargetCondEffect = CondEffect.CreateCondEffect(master.GetCondEffectParam(this.SkillParam.target_cond_iname), (int)this.mRank, (int)this.mRankCap);
         this.mSelfCondEffect   = CondEffect.CreateCondEffect(master.GetCondEffectParam(this.SkillParam.self_cond_iname), (int)this.mRank, (int)this.mRankCap);
         this.UpdateParam();
     }
 }