Beispiel #1
0
 void Awake()
 {
     _originalPosition      = transform.position;
     _originalWireColor     = _wires.Count > 0 ? _wires[0].color : Color.black;
     _replayUpdateComponent = GetComponent <ReplayUpdateComponent>();
     _replayUpdateComponent.SetBeforeReplayAction(ResetToInitial);
 }
Beispiel #2
0
 void Awake()
 {
     _boxCollider     = GetComponent <BoxCollider2D>();
     _spriteRenderer  = GetComponent <SpriteRenderer>();
     _replayComponent = GetComponent <ReplayUpdateComponent>();
     _replayComponent.SetBeforeReplayAction(ResetToInitial);
     _time = _isAble ? _enableDuration : _disableDuration;
 }
Beispiel #3
0
 void Awake()
 {
     _replayUpdateComponent = GetComponent <ReplayUpdateComponent>();
     _replayUpdateComponent.SetBeforeReplayAction(() =>
     {
         _replayUpdateComponent.Unregister();
         Destroy(gameObject);
     });
 }
Beispiel #4
0
 void Awake()
 {
     _replayUpdateComponent = GetComponent <ReplayUpdateComponent>();
     _initialRotation       = transform.eulerAngles;
     _replayUpdateComponent.SetBeforeReplayAction(ResetToInitial);
 }