public void Load() { if (string.IsNullOrEmpty(_riftLocation)) { Debug.LogError("Error Loading Scene: Empty Location"); return; } //var config = RiftDatabase.GetRift(_riftLocation); //if (config == null) { // Debug.LogErrorFormat("Error Loading Scene: {0}", _riftLocation); // return; //} //var location = RiftsMap.GetLocationFromConfig(config); //if (location != null) { // if (location is RiftTown) { // _playerData.Load(); // location.Entered(); // return; // } //} //_playerData.Load(); //GlobalLevelController.LoadLevelFromSaveGame(config, _riftLevel, this); //LevelController.Clear(); //LoadList(LevelController.Root.gameObject, _level); //LoadList(ItemPool.ActiveSceneTr.gameObject, _activePooled); World.Enqueue(new SaveGameLoaded()); }
public void Post <T>(int entity, T msg) where T : struct, IEntityMessage { #if DEBUGMSGS DebugLog.Add(DebugId + " posted " + msg.GetType().Name); #endif World.Enqueue(msg); if (!_entityEvents.TryGetValue(entity, out var hub)) { return; } hub.Post(msg); }
public void PostAll <T>(T msg) where T : struct, IEntityMessage { _eventHub.Post <T>(msg); World.Enqueue(msg); var parent = this.GetParent(); while (parent != null) { parent._eventHub.Post(msg); parent = parent.GetParent(); } }
public void PostAll <T>(Entity entity, T msg) where T : struct, IEntityMessage { #if DEBUGMSGS DebugLog.Add(DebugId + " posted " + msg.GetType().Name); #endif World.Enqueue(msg); var targetEntity = entity; while (targetEntity != null) { if (_entityEvents.TryGetValue(targetEntity, out var hub)) { hub.Post(msg); } targetEntity = targetEntity.GetParent(); } }
public void Post <T>(T msg) where T : struct, IEntityMessage { World.Enqueue(msg); }
public void Post <T>(T msg) where T : struct, IEntityMessage { _eventHub.Post <T>(msg); World.Enqueue(msg); }