Ejemplo n.º 1
0
        private void BuildSkills(int nActorSkillID)
        {
            var rSymbolObjs = GPCSkillConfig.Instance.GetActorSkill(nActorSkillID);

            this.Skills = new List <GPCSkill>();
            if (rSymbolObjs == null)
            {
                return;
            }

            for (int i = 0; i < rSymbolObjs.Count; i++)
            {
                List <GamePlayComponent> rComps = new List <GamePlayComponent>();
                for (int j = 0; j < rSymbolObjs[i].Bodies.Count; j++)
                {
                    var rCompType = HotfixReflectAssists.GetType("Game.Knight." + rSymbolObjs[i].Bodies[j].Identifer.Value);
                    var rComp     = HotfixReflectAssists.Construct(
                        rCompType,
                        this,
                        rSymbolObjs[i].Bodies[j].ToArgs()) as GamePlayComponent;
                    rComps.Add(rComp);
                }

                GPCSkill rGPCSkill = new GPCSkill(this, rSymbolObjs[i].Head.ToArgs(), rComps);
                this.Skills.Add(rGPCSkill);
            }

            for (int i = 0; i < this.Skills.Count; i++)
            {
                this.Skills[i].Initialize();
            }
        }
Ejemplo n.º 2
0
        private void BuildSkills(int nActorSkillID)
        {
            var rSymbolObjs = GPCSkillConfig.Instance.GetActorSkill(nActorSkillID);

            this.Skills = new List <GPCSkill>();
            if (rSymbolObjs == null)
            {
                return;
            }

            for (int i = 0; i < rSymbolObjs.Count; i++)
            {
                List <GamePlayComponent> rComps = new List <GamePlayComponent>();
                for (int j = 0; j < rSymbolObjs[i].Bodies.Count; j++)
                {
                    var rCompType = MainAssemblyExpand.GetType("Game.Knight." + rSymbolObjs[i].Bodies[j].Identifer.Value);
                    var rComp     = ReflectionAssist.Construct(
                        rCompType,
                        new Type[] { typeof(ActorGamePlayManager), typeof(List <string>) },
                        this,
                        rSymbolObjs[i].Bodies[j].ToArgs()) as GamePlayComponent;
                    rComps.Add(rComp);
                }

                GPCSkill rGPCSkill = new GPCSkill(this, rSymbolObjs[i].Head.ToArgs(), rComps);
                this.Skills.Add(rGPCSkill);
            }

            for (int i = 0; i < this.Skills.Count; i++)
            {
                this.Skills[i].Initialize();
            }
        }
Ejemplo n.º 3
0
        public void Play(int nSkillFixedID)
        {
            if (this.Skills == null)
            {
                return;
            }
            this.CurSkill = this.Get(nSkillFixedID);

            mIsPlaying = true;
            mIsPause   = false;
            mCurTime   = 0.0f;
        }