Exemplo n.º 1
0
    //연속
    private void AddSkill_Paper(ref SkillSlot List)
    {//위와 동일
        CharacterStatus Orderstat;

        Skill NewSkill = new Skill(Priority.PAPER, "강");

        NewSkill.PassiveCount.Add("RSPATTACK", Stop);
        NewSkill.PassiveCount.Add("Damage", DamageData.Strong);       //패시브카운트에 "RSPATTACK"추가
        NewSkill.PassiveCount.Add("Cost", CostData.Strong);           //패시브카운트에 "Cost"추가
        NewSkill.PassiveCount.Add("KnockBack", KnockBackData.Strong); //패시브카운트에 "KnockBack"추가

        NewSkill.ActiveSkillSet(delegate(Skill skl)
        {//사용시
            gameManager.ins.AnimationSetting(skl.Order, 0, CharacterAnim.AnimStasis.LATK);
            gameManager.ins.AnimationSetting(skl.Order, 1, CharacterAnim.AnimStasis.LATK);
            Debug.Log("CallThis - Skill_UseRock");
            Orderstat = gameManager.ins.UserStatus[skl.Order];
            skl.PassiveCount["RSPATTACK"] = Run;
            Orderstat.AttackType          = Priority.PAPER;
            Orderstat.CostUse((int)skl.PassiveCount["Cost"]);

            SaveData.ins.AddData(SaveData.TYPE.PAPER, Orderstat.Controller, SaveData.Try, 1);//저장용
        });
        NewSkill.AddPassive(delegate(Skill skl)
        {                                                  //공격시
            Orderstat = gameManager.ins.UserStatus[skl.Order];
            if ((int)skl.PassiveCount["RSPATTACK"] == Run) //키누른게 이 함수가 맞는지 체크
            {
                gameManager.ins.AnimationSetting(skl.Order, 2, CharacterAnim.AnimStasis.IDLE);
                DamageCalculator.ins.SetDamage((int)skl.PassiveCount["Damage"]);
                WallManager.ins.Move((int)(skl.PassiveCount["KnockBack"] * gameManager.ins.TimingWeight[skl.Order]), Orderstat.Enemy()); //벽이동
                SaveData.ins.AddData(SaveData.TYPE.PAPER, Orderstat.Controller, SaveData.Success, 1);                                    //저장용
                skl.PassiveCount["RSPATTACK"] = Stop;
            }
        }, "Attack");
        NewSkill.AddPassive(delegate(Skill skl)
        {
            Orderstat = gameManager.ins.UserStatus[skl.Order];
            skl.PassiveCount["RSPATTACK"] = Stop;
        }
                            , "End");
        List.GetSlot("강").SkillChange(NewSkill);
    }
Exemplo n.º 2
0
    //압박
    private void AddSkill_Rock(ref SkillSlot List)
    {
        CharacterStatus Orderstat;

        Skill NewSkill = new Skill(Priority.ROCK, "중");               //우선순위 = 압박, 이름 압박설정

        NewSkill.PassiveCount.Add("RSPATTACK", Stop);                 //패시브카운트에 "RSPATTACK"추가
        NewSkill.PassiveCount.Add("Damage", DamageData.Middle);       //패시브카운트에 "RSPATTACK"추가
        NewSkill.PassiveCount.Add("Cost", CostData.Middle);           //패시브카운트에 "Cost"추가
        NewSkill.PassiveCount.Add("KnockBack", KnockBackData.Middle); //패시브카운트에 "KnockBack"추가

        NewSkill.ActiveSkillSet(delegate(Skill skl)
        {//사용시
            gameManager.ins.AnimationSetting(skl.Order, 0, CharacterAnim.AnimStasis.MATK);
            gameManager.ins.AnimationSetting(skl.Order, 1, CharacterAnim.AnimStasis.MATK);
            Debug.Log("CallThis - Skill_UseRock");
            Orderstat = gameManager.ins.UserStatus[skl.Order];
            skl.PassiveCount["RSPATTACK"] = Run;
            Orderstat.AttackType          = Priority.ROCK;
            Orderstat.CostUse((int)skl.PassiveCount["Cost"]);                                //코스트4

            SaveData.ins.AddData(SaveData.TYPE.ROCK, Orderstat.Controller, SaveData.Try, 1); //저장용
        });                                                                                  //액티브 스킬 사용

        NewSkill.AddPassive(delegate(Skill skl)
        {                                                  //공격시
            Orderstat = gameManager.ins.UserStatus[skl.Order];
            if ((int)skl.PassiveCount["RSPATTACK"] == Run) //키누른게 이 함수가 맞는지 체크
            {
                gameManager.ins.AnimationSetting(skl.Order, 2, CharacterAnim.AnimStasis.IDLE);
                DamageCalculator.ins.SetDamage((int)skl.PassiveCount["Damage"]);                                                         //데미지 5
                WallManager.ins.Move((int)(skl.PassiveCount["KnockBack"] * gameManager.ins.TimingWeight[skl.Order]), Orderstat.Enemy()); //벽이동

                SaveData.ins.AddData(SaveData.TYPE.ROCK, Orderstat.Controller, SaveData.Success, 1);                                     //저장용
            }
            skl.PassiveCount["RSPATTACK"] = Stop;
        }, "Attack");                                //공격시 발동

        NewSkill.AddPassive(Skill_UseRSPEnd, "End"); //종료시 발동

        List.GetSlot("중").SkillChange(NewSkill);     //인자로 받은 리스트에 추가
    }