當前位置: 首頁>>代碼示例>>C#>>正文


C# Character.castSkill方法代碼示例

本文整理匯總了C#中Character.castSkill方法的典型用法代碼示例。如果您正苦於以下問題:C# Character.castSkill方法的具體用法?C# Character.castSkill怎麽用?C# Character.castSkill使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Character的用法示例。


在下文中一共展示了Character.castSkill方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Cast

    public override IEnumerator Cast(ArrayList objs)
    {
        GameObject caller = objs[1] as GameObject;
        GameObject target = objs[2] as GameObject;

        character = caller.GetComponent<Character>();
        enemy = target.GetComponent<Character>();

        character.castSkill("Skill30A_a");
        character.toward(enemy.transform.position);
        character.attackAnimaName = "Skill30A_b";

        if(character is Nebula){
            Nebula nebula = character as Nebula;
            nebula.showSkill30AHaloEftCallBack += showHaloEft;
            nebula.showSkill30ABulletEftCallBack += showBulletEft;
        }else if(character is Ch2_Nebula){
            Ch2_Nebula nebula = character as Ch2_Nebula;
            nebula.showSkill30AHaloEftCallBack += showHaloEft;
            nebula.showSkill30ABulletEftCallBack += showBulletEft;
        }

        SkillDef skillDef = SkillLib.instance.getSkillDefBySkillID("NEBULA30A");
        int buffTime = (int)skillDef.buffDurationTime;
        int tempAtk = (int)((Effect)skillDef.activeEffectTable["atk_PHY"]).num;
        int tempAspd = (int)((Effect)skillDef.activeEffectTable["aspd"]).num;

        character.addBuff("Skill_NEBULA30A",buffTime,tempAtk,BuffTypes.ATK_PHY,buffFinish);
        character.addBuff("Skill_NEBULA30A",buffTime,tempAspd,BuffTypes.ASPD);

        yield return new WaitForSeconds(1f);

        createBgFire();
    }
開發者ID:rogeryuan99,項目名稱:Hello,代碼行數:34,代碼來源:Skill_NEBULA30A.cs

示例2: Cast

    public override IEnumerator Cast(ArrayList objs)
    {
        GameObject caller = objs[1] as GameObject;
        GameObject target = objs[2] as GameObject;

        this.charlie27 = caller.GetComponent<Character>();
        this.enemy = target.GetComponent<Character>();

        charlie27.castSkill("Skill15A");
        charlie27.toward(enemy.transform.position);

        //		if (charlie27 is Charlie27)
        //			(charlie27 as Charlie27)
        //		else
        //			(charlie27 as Ch3_Charlie27)
        if (charlie27 is Charlie27){
            (charlie27 as Charlie27).showSkill15AHitEftCallback += showHitEft;
            (charlie27 as Charlie27).showSkill15ABangEftCallback += showBangEft;
        }
        else{
            (charlie27 as Ch3_Charlie27).showSkill15AHitEftCallback += showHitEft;
            (charlie27 as Ch3_Charlie27).showSkill15ABangEftCallback += showBangEft;
        }

        yield return new WaitForSeconds(0f);
    }
開發者ID:rogeryuan99,項目名稱:Hello,代碼行數:26,代碼來源:Skill_CHARLIE2715A.cs

示例3: Cast

    public override IEnumerator Cast(ArrayList objs)
    {
        GameObject caller = objs[1] as GameObject;

        character = caller.GetComponent<Character>();
        character.castSkill("Skill30A_a");
        character.attackAnimaName = "Skill30A_b";

        SkillDef skillDef = SkillLib.instance.getSkillDefBySkillID("SKUNGE30A");
        int buffTime = (int)skillDef.skillDurationTime;
        character.addBuff("Skill_SKUNGE30A",buffTime,0,BuffTypes.ATK_PHY,buffFinish);

        yield return new WaitForSeconds(0f);
    }
開發者ID:rogeryuan99,項目名稱:Hello,代碼行數:14,代碼來源:Skill_SKUNGE30A.cs

示例4: Cast

    public override IEnumerator Cast(ArrayList objs)
    {
        parms = objs;
        GameObject caller = parms[1] as GameObject;
        charlie27 = caller.GetComponent<Character>();

        GameObject target = parms[2] as GameObject;
        enemy = target.GetComponent<Character>();

        charlie27.castSkill("SkillA");
        charlie27.toward(enemy.transform.position);

        LoadResources();

        if (charlie27 is Charlie27)
            AddFrameEvent(charlie27 as Charlie27);
        else
            AddFrameEvent(charlie27 as Ch3_Charlie27);

        yield return new WaitForSeconds(0f);
    }
開發者ID:rogeryuan99,項目名稱:Hello,代碼行數:21,代碼來源:Skill_CHARLIE271.cs

示例5: Cast

    public override IEnumerator Cast(ArrayList objs)
    {
        GameObject caller = objs[1] as GameObject;
        GameObject target = objs[2] as GameObject;

        yield return new WaitForSeconds(0.5f);

        character = caller.GetComponent<Character>();

        if(character is Caiera)
        {
            Caiera caiera = character as Caiera;
            caiera.showSkill30BHaloEftCallback += showSkill30BShowHaloEft;

        }
        else if(character is Ch3_Caiera)
        {
            Ch3_Caiera caiera = character as Ch3_Caiera;
            caiera.showSkill30BHaloEftCallback += showSkill30BShowHaloEft;
        }

        character.castSkill("Skill30B");

        SkillDef skillDef = SkillLib.instance.allHeroSkillHash["CAIERA30B"] as SkillDef;

        int buffime = skillDef.buffDurationTime;

        character.hurtBeforeState = Character.HurtBeforeState.NOTHURT;

        character.realAtk.ENG = character.realAtk.PHY;
        character.realAtk.PHY = 0;

        character.addBuff("Skill_CAIERA30B", buffime, 0, BuffTypes.DEF_PHY, buffFinish);

        StaticData.createObjFromPrb(ref firstFirePrb, "eft/Caiera/Skill_CAIERA30B_FirstFire", ref firstFire, character.transform, new Vector3(0, 0, 1));

        firstFire.GetComponent<PackedSprite>().SetAnimCompleteDelegate(showSecondFire);

        MusicManager.playEffectMusic("SFX_Caiera_Shadow_Warrior_1a");
    }
開發者ID:rogeryuan99,項目名稱:Hello,代碼行數:40,代碼來源:Skill_CAIERA30B.cs

示例6: Cast

    public override IEnumerator Cast(ArrayList objs)
    {
        parms = objs;
        GameObject caller = parms[1] as GameObject;
        GameObject target = parms[2] as GameObject;
        skunge = caller.GetComponent<Character>();
        enemy  = target.GetComponent<Character>();
        skunge.toward(target.transform.position);
        skunge.castSkill("SkillA");
        yield return new WaitForSeconds(0.98f);

        showEft();

        yield return new WaitForSeconds(0.2f);
        //				Time.timeScale = 0.01f;
        //		int i = 0;
        //		while(1>0){
        //			yield return new WaitForSeconds(0.01f);
        //			Debug.LogError(i++);
        //		}
        DamageEnemy();
    }
開發者ID:rogeryuan99,項目名稱:Hello,代碼行數:22,代碼來源:Skill_SKUNGE1.cs


注:本文中的Character.castSkill方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。