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); }
private void TakeEffect() { healthModifier.TakeEffect(); animatorTrigger.TakeEffect(); audioPlayModifier.TakeEffect(); creatEffectModifier.TakeEffect(); }
private void TakeAction() { positionModifier.DeltaPosition = Time.deltaTime * MoveDirection(trend) * speed.Value; positionModifier.TakeEffect(); animatorModifier.TakeEffect(); }
private void TakeAction() { positionModifier.DeltaPosition = Time.deltaTime * direction * (speed.Value + accedlerate); positionModifier.TakeEffect(); animatorModifier.TakeEffect(); }
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(); }
private void TakeEffect() { healthModifier.TakeEffect(); animatorTrigger.TakeEffect(); }