本文整理汇总了C#中Hero.getIsDead方法的典型用法代码示例。如果您正苦于以下问题:C# Hero.getIsDead方法的具体用法?C# Hero.getIsDead怎么用?C# Hero.getIsDead使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Hero
的用法示例。
在下文中一共展示了Hero.getIsDead方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: changeDirection
public void changeDirection()
{
if(targetObj == null)
{
getNewTarget();
}
if(targetObj == null)
{
return;
}
atkHero = targetObj.GetComponent<Hero>();
if(atkHero.getIsDead())
{
getNewTarget();
}
if(atkHero)
{
if(model.transform.localScale.x > 0 && (model.transform.position.x > atkHero.transform.position.x))
{
model.transform.localScale += new Vector3(-0.8f,0,0);
// model.transform.localScale.x = -0.8f;
}
if(model.transform.localScale.x < 0 && (model.transform.position.x < atkHero.transform.position.x))
{
model.transform.localScale += new Vector3(0.8f,0,0);
// model.transform.localScale.x = 0.8f;
}
}
}
示例2: startHeal
public void startHeal( Hero hero )
{
if(this.isDead){
return;
}
//gwp
GameObject tempTarget = targetObj;
Hero tempTargetData = null;
//gwp end
state = ATK_STATE;
targetObj = hero.gameObject;
//gwp
if(tempTarget != null){
tempTargetData = tempTarget.GetComponent<Hero>();
if(!tempTargetData.getIsDead()){
if(isAddAtk){
// tempTargetData.addAtk(-addAtkValue);
}
if(isAddDef){
// tempTargetData.addDef(-addDefValue);
}
}
}
//gwp end
if(!hero.getIsDead())
{
if(isAddAtk){
// addAtkValue = hero.realAtk*25/100;
// hero.addAtk(addAtkValue);
}
if(isAddDef){
// addDefValue = hero.realDef*25/100;
// hero.addDef(addDefValue);
}
if( !IsInvoking("healTarget") )
{
healTarget();
CancelInvoke("healTarget");
InvokeRepeating("healTarget", realAspd, realAspd);
}
}
}
示例3: startHeal
public void startHeal( Hero hero )
{
if(this.isDead)
{
return;
}
state = ATK_STATE;
targetObj = hero.gameObject;
if(!hero.getIsDead())
{
if( !IsInvoking("healTarget") )
{
healTarget();
CancelInvoke("healTarget");
InvokeRepeating("healTarget", realAspd, realAspd);
}
}
}