public void ReplacePayLinesTries(PayLinesTrie newValue) { var index = GameComponentsLookup.PayLinesTries; var component = CreateComponent <PayLinesTriesComponent>(index); component.value = newValue; ReplaceComponent(index, component); }
private void SetPayLines() { _trie = new PayLinesTrie(); foreach (var data in payLinesData) { _trie.Insert(data.payLineValue); } }
public GameEntity SetPayLinesTries(PayLinesTrie newValue) { if (hasPayLinesTries) { throw new Entitas.EntitasException("Could not set PayLinesTries!\n" + this + " already has an entity with PayLinesTriesComponent!", "You should check if the context already has a payLinesTriesEntity before setting it or use context.ReplacePayLinesTries()."); } var entity = CreateEntity(); entity.AddPayLinesTries(newValue); return(entity); }
public void ReplacePayLinesTries(PayLinesTrie newValue) { var entity = payLinesTriesEntity; if (entity == null) { entity = SetPayLinesTries(newValue); } else { entity.ReplacePayLinesTries(newValue); } }
//----------------------------------- private void Start() { this._tries = new PayLinesTrie(); }