本文整理汇总了C#中Unit.ShowCombatText方法的典型用法代码示例。如果您正苦于以下问题:C# Unit.ShowCombatText方法的具体用法?C# Unit.ShowCombatText怎么用?C# Unit.ShowCombatText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Unit
的用法示例。
在下文中一共展示了Unit.ShowCombatText方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UseAbility
public override void UseAbility(Unit target)
{
base.UseAbility (target);
Vector3 pos = map.TileCoordToWorldCoord (target.tileX, target.tileY);
myVisualEffects.Add (effectLib.CreateVisualEffect ("Hit1", pos).GetComponent<EffectController> ());
int dmg = (int)(damage * myCaster.damageDealtMod);
myCaster.AddGuardPoints (2);
// if the target is normal or smaller size
if (target.mySize <= UnitSize.Normal) {
int diffX = target.tileX - myCaster.tileX;
int diffY = target.tileY - myCaster.tileY;
//deal damage, if not dodged, apply effect
if (target.TakeDamage(dmg, effectLib.getSoundEffect ("Shield Slam"), true, myCaster) != -1) {
target.ApplyEffect (new Snare ("Barged", duration, effectLib.getIcon("Barge").sprite));
target.ShowCombatText ("Snared", myTarget.statusCombatText);
if (map.UnitCanEnterTile(myCaster.tileX+(diffX*2), myCaster.tileY+(diffY*2))) {
target.SlideToTile(myCaster.tileX+(diffX*2), myCaster.tileY+(diffY*2));
myCaster.SlideToTile(myCaster.tileX+(diffX), myCaster.tileY+(diffY));
}
}
} else {
if (target.TakeDamage(dmg, effectLib.getSoundEffect ("Shield Slam"), true, myCaster) != -1) {
target.ApplyEffect (new Snare ("Barged", duration, effectLib.getIcon("Barge").sprite));
target.ShowCombatText ("Snared", myTarget.statusCombatText);
}
}
}
示例2: RunTrigger
public override void RunTrigger (Unit host, Unit attacker = null)
{
base.RunTrigger (host, attacker);
host.ApplyEffect(new ManaLeachEffect("Mana Leach", 2, myCaster, 10, 0));
host.ApplyEffect (new Snare ("Mana Trap", 2));
host.ShowCombatText ("Snared", host.statusCombatText);
}
示例3: RunEffect
public override void RunEffect(Unit u, bool reapply = false)
{
base.RunEffect(u, reapply);
u.movespeed = -100;
u.maxAP = -100;
if (!reapply) {
u.ShowCombatText ("Stunned " + duration.ToString(), u.statusCombatText);
}
}
示例4: RunEffect
public override void RunEffect(Unit u, bool reapply = false)
{
base.RunEffect(u, reapply);
u.movespeed = -100;
u.remainingMove = -100;
if (!reapply) {
u.ShowCombatText ("Snared", u.statusCombatText);
}
}
示例5: UseAbility
public override void UseAbility(Unit target)
{
base.UseAbility (target);
int combo = myCaster.UseGuardPoints ();
int dmg = (int)(damage * myCaster.damageDealtMod);
if (target.TakeDamage(dmg * combo, effectLib.getSoundEffect ("Shield Slam"), true, myCaster) != -1) {
target.ApplyEffect(new Stun("Shield Slammed", (int)(combo / 2), effectLib.getIcon("Shield Slam").sprite));
target.ShowCombatText ("Stunned", target.statusCombatText);
}
}
示例6: UseAbility
public override void UseAbility(Unit target)
{
base.UseAbility (target);
target.ApplyEffect (new MovespeedMod ("Righteous Speed", duration, 1, 1, effectLib.getIcon("Righteous Shield").sprite));
target.ApplyEffect (new ShieldEffect ("Righteous Shield", shieldDuration, shield, effectLib.getIcon("Righteous Shield").sprite));
target.ShowCombatText (shield.ToString (), target.statusCombatText);
target.UpdateHealthBar ();
Vector3 pos = map.TileCoordToWorldCoord (target.tileX, target.tileY);
myVisualEffects.Add (effectLib.CreateVisualEffect ("Righteous Shield", pos).GetComponent<EffectController> ());
myCaster.GetComponent<AudioSource> ().PlayOneShot (effectLib.getSoundEffect ("Righteous Shield"));
}
示例7: UseAbility
public override void UseAbility(Unit target)
{
cooldown = maxCooldown;
AbilityFinished = false;
myTarget = target;
int dmg = (int)(damage * myCaster.damageDealtMod);
//deal damage, if not dodged, apply effect
if (target.TakeDamage (dmg, null, true, myCaster) != -1) {
if (target.ApplyEffect (new Stun ("Frozen", duration, effectLib.getIcon("Flash Freeze").sprite))) {
target.ShowCombatText ("Stunned", target.statusCombatText);
}
}
}