예제 #1
0
        public void SetSavedState(ObjectSaveState state)
        {
            transform.position = state.StartingPosition;
            ShapeType          = state.StartingShapeType;

            _collidedTargets = new List <TargetShape>();
        }
예제 #2
0
        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
                });
            }
        }
예제 #3
0
 public void SetSavedState(ObjectSaveState state)
 {
     transform.position = state.StartingPosition;
     ShapeType          = state.StartingShapeType;
     StartDirection     = state.StartingDirection;
 }
예제 #4
0
 public void SetSavedState(ObjectSaveState state)
 {
     transform.position = state.StartingPosition;
     _targetType        = state.StartingShapeType;
 }