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


C# Character.defenseAtk方法代碼示例

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


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

示例1: OnAtkAnimaScriptTarget

    public override void OnAtkAnimaScriptTarget(Character targetCharacter)
    {
        int dmg;

        dmg = targetCharacter.defenseAtk(this.hero.realAtk, this.hero.gameObject);

        this.hero.trinketEfts(dmg);
    }
開發者ID:rogeryuan99,項目名稱:Hello,代碼行數:8,代碼來源:HeroAI.cs

示例2: attack

    public void attack(Character character, Character target)
    {
        SkillDef skillDef = SkillLib.instance.getSkillDefBySkillID("BUG15B");
        int skillDurationTime = skillDef.skillDurationTime;

        if(!target.isAbnormalStateActive(Character.ABNORMAL_NUM.LAYDOWN))
        {
            target.addAbnormalState(skillDurationTime, null, Character.ABNORMAL_NUM.LAYDOWN);
        }

        target.defenseAtk(character.realAtk, character.gameObject);
    }
開發者ID:rogeryuan99,項目名稱:Hello,代碼行數:12,代碼來源:Skill_BUG15B.cs

示例3: Skill_DRAX30AEffect

    public void Skill_DRAX30AEffect(Drax drax, Character target)
    {
        MusicManager.playEffectMusic("SFX_Drax_The_Destroyer_1a");
        SkillDef skillDef = SkillLib.instance.getSkillDefBySkillID("DRAX30A");
        int skillDurationTime = skillDef.skillDurationTime;
        int buffDurationTime = skillDef.buffDurationTime;
        Hashtable buffTable = skillDef.buffEffectTable;

        float per = ((Effect)buffTable["hp"]).num;
        int hp = (int)(target.realMaxHp * (per / 100.0f));

        if(StaticData.computeChance(50, 100))
        {
            target.addBuff("Skill_DRAX30A_DE_HP", buffDurationTime, hp / buffDurationTime, BuffTypes.DE_HP);
        //			target.layDownWithSeconds();

            State s = new State(skillDurationTime, null);
            target.addAbnormalState(s, Character.ABNORMAL_NUM.LAYDOWN);
        }

        target.defenseAtk(drax.realAtk, drax.gameObject);
    }
開發者ID:rogeryuan99,項目名稱:Hello,代碼行數:22,代碼來源:Skill_DRAX30A.cs

示例4: OnAtkAnimaScriptTarget

 public override void OnAtkAnimaScriptTarget(Character targetCharacter)
 {
     this.enemy.playAtkEft();
     targetCharacter.defenseAtk(this.enemy.realAtk, this.enemy.gameObject);
 }
開發者ID:rogeryuan99,項目名稱:Hello,代碼行數:5,代碼來源:EnemyAI.cs


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