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