public GameMaker(int rowCount, int rowWidth, int groundFrom, int groundTo, GameObject player, ILevelGenerator levelGenerator, IGameRules gameRules, IWorldCreator worldCreator) { _rowCount = rowCount; _rowWidth = rowWidth; _groundFrom = groundFrom; _groundTo = groundTo; _worldCreator = worldCreator; _player = player; _levelGenerator = levelGenerator; _gameRules = gameRules; Debug.Log("New game, GameMaker constructor."); }
protected WorldBase(IWorldOptions options, IWorldCreator worldCreator) { if (worldCreator is null) { throw new ArgumentNullException(nameof(worldCreator)); } Options = options ?? throw new ArgumentNullException(nameof(options)); WorldCreator = worldCreator; worldCreator.WorldCreated += () => WorldCreated?.Invoke(); WorldCreated += OnWorldCreated; if (Options.CreateWorldOnInstantiate) { CreateWorld(); } }
public MyWorldBaseImpl(IWorldOptions options, IWorldCreator worldCreator) : base(options, worldCreator) { }