本文整理汇总了C#中Character.addBuff方法的典型用法代码示例。如果您正苦于以下问题:C# Character.addBuff方法的具体用法?C# Character.addBuff怎么用?C# Character.addBuff使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Character
的用法示例。
在下文中一共展示了Character.addBuff方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
示例2: showSkill15BEft
public void showSkill15BEft(Character character)
{
Bug bug = character as Bug;
bug.showSkill15BEftCallback -= showSkill15BEft;
float skillEftX = 0;
float haloEftX = 0;
if(character.model.transform.localScale.x > 0)
{
skillEftX = 244;
haloEftX = 273.1709f;
}
else
{
skillEftX = -297;
haloEftX = -277.1709f;
}
GameObject skillEft = null;
StaticData.createObjFromPrb(ref skillEftPrb, "eft/Bug/SkillEft_BUG15B_Eft", ref skillEft, character.transform, new Vector3(skillEftX, 84, 0));
GameObject haloEft = null;
StaticData.createObjFromPrb(ref haloEftPrb, "eft/Bug/SkillEft_BUG15B_HaloEft", ref haloEft, character.transform, new Vector3(haloEftX, 0, 0));
// Debug.Break();
SkillDef skillDef = SkillLib.instance.allHeroSkillHash["BUG15B"] as SkillDef;
float per = ((Effect)skillDef.buffEffectTable["atk_PHY"]).num;
character.addBuff("Skill_BUG15B", skillDef.buffDurationTime, per, BuffTypes.ATK_PHY, buffFinish);
}
示例3: showSkill25APassive
public void showSkill25APassive(Character c)
{
SkillDef skillDef = SkillLib.instance.getSkillDefBySkillID("NEBULA25A");
int tempHp = (int)skillDef.passiveEffectTable["universal"];
float hp = c.realMaxHp * ((float)tempHp / 100.0f);
int time = (int)(100f/(float)tempHp);
c.addBuff("Skill_NEBULA25A", time, hp, BuffTypes.DE_HP, buffFinish);
c.changeStateColor(new Color(1f, 1f, 1f, 1f), new Color(.5f, .5f, .5f, 1f), .05f);
}
示例4: 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);
}
示例5: Skill_DRAX5BEffect
public void Skill_DRAX5BEffect(Drax drax, Character target)
{
if(target.getIsDead())
{
return;
}
drax.attackAnimaEvent -= Skill_DRAX5BEffect;
Debug.LogError("Skill_DRAX5BEffect");
SkillDef skillDef = SkillLib.instance.getSkillDefBySkillID("DRAX5B");
Hashtable tempNumber = skillDef.activeEffectTable;
int time = skillDef.buffDurationTime;
float per = ((Effect)skillDef.buffEffectTable["hp"]).num;
int hp = (int)((per / 100.0f + 1.0f) * drax.realMaxHp);
target.addBuff("Skill_DRAX5B", time, (float)hp/(float)time, BuffTypes.DE_HP);
DestroyBuffEft(drax, "Skill_DRAX5B");
}
示例6: 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");
}
示例7: 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);
}