void addCameraSnapPositionIfNotExist(LevelModelComponent component, Entity cameraEntity) { if (!cameraEntity.hasSnapPosition) { cameraEntity.AddSnapPosition(component.position.x, component.position.y, component.size.x, component.size.y, false); } }
public Entity ReplaceEnemySpawner(LevelModelComponent newModel) { var component = CreateComponent<EnemySpawnerComponent>(ComponentIds.EnemySpawner); component.model = newModel; ReplaceComponent(ComponentIds.EnemySpawner, component); return this; }
public void SetData(LevelModelComponent component) { this.component = component; attachScripts(); createModifiers(component); fillViewByComponent(component); createHud(); }
public RightLevelSliderHud(Transform transform, Pool pool, LevelModelComponent component) { go = transform.gameObject; this.pool = pool; this.component = component; camera = Camera.main; addOnValueChangeListener(); addSliderAutoUpdate(); }
public void Execute(LevelModelComponent component) { component.waves.Sort((first, second) => first.spawnBarrier.CompareTo(second.spawnBarrier)); component.enemies.Sort((first, second) => first.spawnBarrier.CompareTo(second.spawnBarrier)); }
void fillViewByComponent(LevelModelComponent component) { foreach (WaveSpawnModel model in component.waves) { factory.CreateWaveElement(model); } foreach (EnemySpawnModel model in component.enemies) { factory.CreateEnemyElement(model); } factory.refreshNumeration(); }
void createModifiers(LevelModelComponent component) { executor = new LevelActionExecutor(component); factory = new EditableElementsFactory(pool.GetGroup(Matcher.MaterialReference).GetSingleEntity().materialReference.storage.Default); createViewModifier(); }
public void Execute(LevelModelComponent component) { component.position.x = x; component.position.y = y; }
public Entity AddEnemySpawner(LevelModelComponent newModel) { var component = CreateComponent<EnemySpawnerComponent>(ComponentIds.EnemySpawner); component.model = newModel; return AddComponent(ComponentIds.EnemySpawner, component); }
public void Execute(LevelModelComponent component) { model = createEnemyModel(); component.enemies.Add(model); }
public LevelActionExecutor(LevelModelComponent component) { this.component = component; }
public UpdateLevel(LevelModelComponent component) { urlData.Add("levels"); urlData.Add("update"); postData.Add("data", JsonConvert.SerializeObject(component, Formatting.None, new JsonConverter[] { new Vector2Converter() })); }
public void Execute(LevelModelComponent component) { component.name = name; }
public override void ParseResult() { Component = JsonConvert.DeserializeObject<LevelModelComponent>(result); }
public void UpdateLevel(LevelModelComponent component, Action onLevelUpdated) { wwwService.Send<UpdateLevel>(new UpdateLevel(component), (request) => onLevelUpdated(), onRequestFailed); }
public void Execute(LevelModelComponent component) { component.enemies.Remove(model); }
public void Execute(LevelModelComponent component) { model = createWaveModel(); component.waves.Add(model); }