Esempio n. 1
0
        public void Spawn(params object[] args)
        {
            if (args?.Length < 2 || !(args[0] is ObstacleData spawnData) || !(args[1] is LevelData levelData))
            {
                Reset();
                return;
            }

            _obstacleData = spawnData;
            _levelData    = levelData;

            ApplySpawnData();
            Enable(true);
        }
 protected override object[] GetSpawnData()
 {
     _spawnData = _obstacleDataManager.GetNextObstacleData();
     return(new object[] { _spawnData, _levelDataManager.CurrentLevelData });
 }