本文整理汇总了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();
}
示例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);
}
示例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);
}
示例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);
}
示例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");
}
示例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();
}