Beispiel #1
0
 public WO_Switch(DB_WorldObject data, ObjectsMgr manager)
     : base(data, manager)
 {
     if (!DataMgr.Select(data.Data01, out m_map))
     {
         ServerLogger.LogError($"Map Switch {data.Guid} map {data.Data01} doesn't exist");
     }
     else
     {
         m_view = _server.Room.SceneViewManager.CreateNetworkedSceneObjectView(_data.Guid);
         m_view.SubscribeToRpc(1, RPC_001);
         OnDestroy += WO_Switch_OnDestroy;
     }
     Spawn();
 }
Beispiel #2
0
 private void WO_Switch_OnDestroy()
 {
     m_view.UnsubscribeFromRpc(1);
     m_view = null;
 }
 protected override void OnInitialize()
 {
     base.OnInitialize();
     m_view = m_manager.CreateSceneObject(m_data.Guid);
     m_view.SubscribeToRpc(1, RPC_001);
 }