public void SetSavedState(ObjectSaveState state) { transform.position = state.StartingPosition; ShapeType = state.StartingShapeType; _collidedTargets = new List <TargetShape>(); }
private void SaveLevelState() { _startLevelState = new Dictionary <MonoBehaviour, ObjectSaveState>(); var playerState = new ObjectSaveState { StartingPosition = _levelData.Player.transform.position, StartingShapeType = _levelData.Player.ShapeType }; _startLevelState.Add(_levelData.Player, playerState); foreach (var shape in _levelData.Shapes) { _startLevelState.Add(shape, new ObjectSaveState { StartingPosition = shape.transform.position, StartingShapeType = shape.ShapeType }); } }
public void SetSavedState(ObjectSaveState state) { transform.position = state.StartingPosition; ShapeType = state.StartingShapeType; StartDirection = state.StartingDirection; }
public void SetSavedState(ObjectSaveState state) { transform.position = state.StartingPosition; _targetType = state.StartingShapeType; }