示例#1
0
    public IEnumerator TemporaneousArmourBuff(int bonusArmour, int seconds)
    {
        _myStats.armour += bonusArmour;
        yield return(Waiter.Active(seconds));

        _myStats.armour -= bonusArmour;
    }
示例#2
0
    public IEnumerator TemporaneousDamageBuff(int bonusDamage, int seconds)
    {
        _myStats.damage += bonusDamage;
        yield return(Waiter.Active(seconds));

        _myStats.damage -= bonusDamage;
    }
示例#3
0
        public override IEnumerator TemporaneousSpeedBuff(int bonusSpeed, int seconds)
        {
            yield return(base.TemporaneousSpeedBuff(bonusSpeed, seconds));

            GetComponent <NavMeshAgent>().speed += bonusSpeed;
            yield return(Waiter.Active(seconds));

            GetComponent <NavMeshAgent>().speed -= bonusSpeed;
        }
示例#4
0
    public override IEnumerator TemporaneousSpeedBuff(int bonusSpeed, int seconds)
    {
        //yield return base.TemporaneousSpeedBuff(bonusSpeed, seconds);

        velocity   += bonusSpeed;
        jumpHeight += (float)bonusSpeed / 2;
        yield return(Waiter.Active(seconds));

        velocity   -= bonusSpeed;
        jumpHeight -= (float)bonusSpeed / 2;
    }
示例#5
0
    public IEnumerator GoToSceneAfterNSeconds(int indexScene, float nSeconds)
    {
        yield return(Waiter.Active(nSeconds));

        GoToScene(indexScene);
    }
示例#6
0
    private IEnumerator PlayAnimationAfterDelay()
    {
        yield return(Waiter.Active(delayBeforeStartingAnimation));

        _animation.Play(PlayMode.StopAll);
    }
示例#7
0
    protected override IEnumerator Die()
    {
        yield return(Waiter.Active(bonusSeconds));

        yield return(base.Die());
    }