当前位置: 首页>>代码示例>>C#>>正文


C# Hero.Heal方法代码示例

本文整理汇总了C#中Hero.Heal方法的典型用法代码示例。如果您正苦于以下问题:C# Hero.Heal方法的具体用法?C# Hero.Heal怎么用?C# Hero.Heal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Hero的用法示例。


在下文中一共展示了Hero.Heal方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Collected

 public override void Collected(Hero collector)
 {
     collector.FullHealth += 2f;
     collector.Heal(2f);
     base.CreatePopUpText("HP +", collector);
     //GameObject.Destroy(gameObject);
 }
开发者ID:julianstengaard,项目名称:TwinSpirits,代码行数:7,代码来源:CollectableHealthUp.cs

示例2: OnActivate

    /* BEGIN REGULAR POWER */
    public override IEnumerator OnActivate(Hero sourceHero, Hero otherHero)
    {
        //Debug.Log("Activating" + this.GetType());
        otherHero.Heal(regenPerSecond);

        return base.OnActivate(sourceHero, otherHero);
    }
开发者ID:julianstengaard,项目名称:TwinSpirits,代码行数:8,代码来源:SpiritRegenHP.cs

示例3: Collected

 public override void Collected(Hero collector)
 {
     collector.movementSpeedBuff -= 1f;
     collector.FullHealth += 4f;
     collector.Heal(4f);
     base.CreatePopUpText("HP ++ Speed -", collector);
     //GameObject.Destroy(gameObject);
 }
开发者ID:julianstengaard,项目名称:TwinSpirits,代码行数:8,代码来源:CollectableFatFuck.cs

示例4: Collected

    public override void Collected(Hero collector)
    {
        if (_collected == true) return;

        _collected = true;
        gameObject.audio.clip = HealthPickupSound;
        gameObject.audio.Play();
        collector.Heal(2);
        gameObject.renderer.enabled = false;
        for (int i = 0; i < gameObject.transform.childCount; i++) {
            gameObject.transform.GetChild(i).gameObject.SetActive(false);
        }
        Destroy(gameObject, HealthPickupSound.length);
    }
开发者ID:julianstengaard,项目名称:TwinSpirits,代码行数:14,代码来源:CollectableHealthPoint.cs

示例5: OnActivateSync

    public override IEnumerator OnActivateSync(Hero sourceHero, Hero otherHero, bool secondSync = false)
    {
        //Debug.Log("Activating" + this.GetType() + " SYNC POWER!");

        if (!secondSync)
        {
            //Pay for activation
            sourceHero.ChangeSpiritAmount(-costActivateSync);
            otherHero.ChangeSpiritAmount(-costActivateSync);

            //Stop other Heros effect
            otherHero.SwitchToSyncPower();
        }

        //Heal both players
        otherHero.Heal(regenPerSync);
        sourceHero.Heal(regenPerSync);

        return null;
    }
开发者ID:julianstengaard,项目名称:TwinSpirits,代码行数:20,代码来源:SpiritRegenHP.cs

示例6: OnUpdate

 public override IEnumerator OnUpdate(Hero sourceHero, Hero otherHero)
 {
     otherHero.Heal(regenPerSecond * Time.deltaTime);
     return null;
 }
开发者ID:julianstengaard,项目名称:TwinSpirits,代码行数:5,代码来源:SpiritRegenHP.cs


注:本文中的Hero.Heal方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。