Exemple #1
0
 void Awake()
 {
     _originalPosition      = transform.position;
     _originalWireColor     = _wires.Count > 0 ? _wires[0].color : Color.black;
     _replayUpdateComponent = GetComponent <ReplayUpdateComponent>();
     _replayUpdateComponent.SetBeforeReplayAction(ResetToInitial);
 }
Exemple #2
0
 void Awake()
 {
     _boxCollider     = GetComponent <BoxCollider2D>();
     _spriteRenderer  = GetComponent <SpriteRenderer>();
     _replayComponent = GetComponent <ReplayUpdateComponent>();
     _replayComponent.SetBeforeReplayAction(ResetToInitial);
     _time = _isAble ? _enableDuration : _disableDuration;
 }
Exemple #3
0
 void Awake()
 {
     _replayUpdateComponent = GetComponent <ReplayUpdateComponent>();
     _replayUpdateComponent.SetBeforeReplayAction(() =>
     {
         _replayUpdateComponent.Unregister();
         Destroy(gameObject);
     });
 }
Exemple #4
0
 //TODO refactor
 public void UnregisterReplayUpdateComponent(ReplayUpdateComponent component)
 {
     _toRemove.Add(component);
 }
Exemple #5
0
 public void RegisterReplayUpdateComponent(ReplayUpdateComponent component)
 {
     _replayUpdatesComponents.Add(component);
 }
Exemple #6
0
 void Awake()
 {
     _replayUpdateComponent = GetComponent <ReplayUpdateComponent>();
     _initialRotation       = transform.eulerAngles;
     _replayUpdateComponent.SetBeforeReplayAction(ResetToInitial);
 }