示例#1
0
 private void Awake()
 {
     _fadeIn           = FadeIn;
     _fadeOut          = FadeOut;
     canvasGroup.alpha = 0;
     _waitSeconds      = new WaitSeconds(this, () => StartCoroutine(_fadeOut()), timeShowing);
 }
示例#2
0
 private void Awake()
 {
     _characterController              = GetComponent <CharacterController>();
     _rigidBody2D                      = GetComponent <Rigidbody2D>();
     _colliders                        = new Collider2D[5];
     _waitSeconds                      = new WaitSeconds(this, RegainMovement, timeNotMoving);
     OnTouchingWall                   += WallTouched;
     _characterController.OnLandEvent += OnLand;
 }
示例#3
0
 private void Awake()
 {
     _camera = FindObjectOfType <CinemachineVirtualCamera>()
               .GetCinemachineComponent <CinemachineFramingTransposer>();
     _hits               = new RaycastHit2D[10];
     _collider           = GetComponent <Collider2D>();
     _rigidBody          = GetComponent <Rigidbody2D>();
     _damageReceiver     = GetComponent <DamageReceiver>();
     _invincibleWaitTime =
         new WaitSeconds(this, () => _damageReceiver.Invincible = false, invincibleTime);
     LastDash = -timeBetweenDashes;
 }
 protected override void Awake()
 {
     base.Awake();
     _waitSeconds = new WaitSeconds(this, FinishCountdown);
 }
示例#5
0
    IEnumerator delayAction(float seconds, Action action)
    {
        yield return(WaitSeconds.GetWaits(seconds));

        action();
    }
示例#6
0
 protected override void Awake()
 {
     base.Awake();
     OnTriggerEnter += TriggerEnter;
     _waitSeconds    = new WaitSeconds(this, PlayerExit, timeToDeactivate);
 }
 private void Awake()
 {
     ChangeVisibility(false);
     _waitForHiding = new WaitSeconds(this, () => ChangeVisibility(false), timeShowingHealth);
 }
 protected virtual void Awake()
 {
     _waitSeconds = new WaitSeconds(this, PlayerEnter, timeBeforeTriggering);
 }