Пример #1
0
    private IEnumerator WarnCorotinue()
    {
        WaitForFixedUpdate wait = new WaitForFixedUpdate();
        float timer             = warningTime;

        boxCollider.enabled = false;
        warningObject.SetActive(true);

        while (timer > 0)
        {
            timer -= Time.fixedDeltaTime;
            yield return(wait);
        }

        boxCollider.enabled = true;
        animatorTrigger.TakeEffect();
        targetAnimator.TakeEffect();
        timer = time;
        while (timer > 0)
        {
            timer -= Time.fixedDeltaTime;
            yield return(wait);
        }
        warningObject.SetActive(false);
        boxCollider.enabled = false;
        ObjectPool.RecycleObject(this.gameObject);
    }
Пример #2
0
 private void TakeEffect()
 {
     healthModifier.TakeEffect();
     animatorTrigger.TakeEffect();
     audioPlayModifier.TakeEffect();
     creatEffectModifier.TakeEffect();
 }
Пример #3
0
        private void TakeAction()
        {
            positionModifier.DeltaPosition = Time.deltaTime * MoveDirection(trend) * speed.Value;
            positionModifier.TakeEffect();

            animatorModifier.TakeEffect();
        }
Пример #4
0
        private void TakeAction()
        {
            positionModifier.DeltaPosition = Time.deltaTime * direction * (speed.Value + accedlerate);
            positionModifier.TakeEffect();

            animatorModifier.TakeEffect();
        }
Пример #5
0
        private void Skill()
        {
            GameObject  prefab = NotionWorld.Worlds.ObjectPool.GetObject(skillBullet, "SkillBullets");
            SkillBullet bullet = prefab.GetComponent <SkillBullet>();

            bullet.Source = Owner.gameObject;
            bullet.Target = targetGameObject.Value;

            Vector2 position  = animatorModifier.Animator.transform.position;
            Vector2 direction = ((Vector2)targetGameObject.Value.transform.position - position);

            direction = direction.normalized;

            bullet.Launch(position, direction);
            coldDownTimer = bullet.coldDown;

            animatorModifier.TakeEffect();
        }
Пример #6
0
 private void TakeEffect()
 {
     healthModifier.TakeEffect();
     animatorTrigger.TakeEffect();
 }