public T ReadValue <T>(EntityIdentifier entityId, string command) { // TODO: optimize object result; commandDict.TryGetValue(command, out result); return((result == null) ? default(T) : (T)result); // TODO }
public T Spawn <T>(T prefab, Vector3 position, Quaternion rotation) where T : EntityComponent { var obj = Instantiate(prefab, position, rotation); obj.identifier = EntityIdentifier.GetNew(); this.Timeline.Replace(obj.identifier, new Spawn { obj = obj.gameObject }); return(obj); }
public TimelineEvent(EntityIdentifier id, ValueType item) { this.id = id; this.item = item; }
void HandleSpawn(EntityIdentifier id, Spawn s) { Destroy(s.obj); this.Timeline.ForgetTheFuture(id); }
void HandleDespawn(EntityIdentifier id, Despawn ds) { ds.obj.SetActive(true); }
public bool Equals(EntityIdentifier other) { //return this.tag == other.tag && this.identifier == other.identifier; return(this.identifier == other.identifier); }
public void SetValue <T>(EntityIdentifier id, string command, T value) { commandDict[command] = value; }