Ejemplo n.º 1
0
		public void add(Skill skill)
		{
			for(int i=0; i<skills.Count; i++)
			{
				if(skills[i].id == skill.id)
				{
					Dbg.DEBUG_MSG("SkillBox::add: " + skill.id  + " is exist!");
					return;
				}
			}
			
			skills.Add(skill);
		}
Ejemplo n.º 2
0
        public virtual void onAddSkill(Int32 skillID)
        {
            Dbg.DEBUG_MSG(className + "::onAddSkill(" + skillID + ")");
            Event.fireOut("onAddSkill", new object[]{this});

            Skill skill = new Skill();
            skill.id = skillID;
            skill.name = skillID + " ";
            switch(skillID)
            {
                case 1:
                    break;
                case 1000101:
                    skill.canUseDistMax = 20f;
                    break;
                case 2000101:
                    skill.canUseDistMax = 20f;
                    break;
                case 3000101:
                    skill.canUseDistMax = 20f;
                    break;
                case 4000101:
                    skill.canUseDistMax = 20f;
                    break;
                case 5000101:
                    skill.canUseDistMax = 20f;
                    break;
                case 6000101:
                    skill.canUseDistMax = 20f;
                    break;
                default:
                    break;
            };

            SkillBox.inst.add(skill);
        }
Ejemplo n.º 3
0
        public virtual void onAddSkill(Int32 skillID)
        {
            Dbg.DEBUG_MSG(className + "::onAddSkill(" + skillID + ")");
            //Event.fireOut("onAddSkill", new object[] { this });

            Skill skill = new Skill();
            skill.id = skillID;
            skill.name = skillID + " ";
            switch (skillID)
            {
                case 1:
                    skill.displayType = Skill_DisplayType.SkillDisplay_Event_Bullet;
                    skill.canUseDistMax = 30f;
                    skill.skillEffect = "skill1";
                    skill.name = "魔法球";
                    break;
                case 2:
                    skill.displayType = Skill_DisplayType.SkillDisplay_Event_Bullet;
                    skill.canUseDistMax = 30f;
                    skill.skillEffect = "skill2";
                    skill.name = "火球";
                    break;
                case 3:
                    skill.displayType = Skill_DisplayType.SkillDisplay_Event_Bullet;
                    skill.canUseDistMax = 20f;
                    skill.skillEffect = "skill3";
                    skill.name = "治疗";
                    break;
                case 4:
                    skill.displayType = Skill_DisplayType.SkillDisplay_Event_Effect;
                    skill.canUseDistMax = 5f;
                    skill.skillEffect = "skill4";
                    skill.name = "斩击";
                    break;
                case 5:
                    skill.displayType = Skill_DisplayType.SkillDisplay_Event_Effect;
                    skill.canUseDistMax = 5f;
                    skill.skillEffect = "skill5";
                    skill.name = "挥击";
                    break;
                case 6:
                    skill.displayType = Skill_DisplayType.SkillDisplay_Event_Effect;
                    skill.canUseDistMax = 5f;
                    skill.skillEffect = "skill6";
                    skill.name = "吸血";
                    break;
                case 6000101:
                    skill.canUseDistMax = 20f;
                    skill.skillEffect = "skill3";
                    break;
                default:
                    break;
            };

            SkillBox.inst.add(skill);

            if (SkillBox.inst.skills.Count == 3)
            {
                Event.fireOut("setSkillButton");
            }
        }