예제 #1
0
 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());
 }
예제 #2
0
        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);
        }
예제 #3
0
파일: Entity.cs 프로젝트: bmjoy/Framework-1
        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();
            }
        }
예제 #4
0
        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();
            }
        }
예제 #5
0
 public void Post <T>(T msg) where T : struct, IEntityMessage
 {
     World.Enqueue(msg);
 }
예제 #6
0
파일: Entity.cs 프로젝트: bmjoy/Framework-1
 public void Post <T>(T msg) where T : struct, IEntityMessage
 {
     _eventHub.Post <T>(msg);
     World.Enqueue(msg);
 }