Exemplo n.º 1
0
 public EditorLogic(CaravelApp app) : base(app)
 {
     m_iPreviousScrollValue     = 0;
     m_PrevMousePos             = new Vector2(-1, -1);
     ProjectDirectory           = Directory.GetCurrentDirectory();
     CurrentScenePostLoadScript = "";
     CurrentScenePreLoadScript  = "";
     CurrentSceneUnLoadScript   = "";
 }
Exemplo n.º 2
0
        public Cv_SceneElement(CaravelApp app)
        {
            Caravel = app;
            EditorSelectedEntity = Cv_EntityID.INVALID_ENTITY;
            m_EntitiesMap        = new Dictionary <Cv_EntityID, List <Cv_SceneNode> >();
            m_HolderNodes        = new Dictionary <Cv_EntityID, Cv_HolderNode>();
            m_TransformStack     = new List <Cv_Transform>();
            m_Root = new Cv_HolderNode(Cv_EntityID.INVALID_ENTITY);

            m_Listeners += Cv_EventManager.Instance.AddListener <Cv_Event_NewRenderComponent>(OnNewRenderComponent);
            m_Listeners += Cv_EventManager.Instance.AddListener <Cv_Event_NewCameraComponent>(OnNewCameraComponent);
            m_Listeners += Cv_EventManager.Instance.AddListener <Cv_Event_NewClickableComponent>(OnNewClickableComponent);
            m_Listeners += Cv_EventManager.Instance.AddListener <Cv_Event_DestroyEntity>(OnDestroyEntity);
            m_Listeners += Cv_EventManager.Instance.AddListener <Cv_Event_DestroyCameraComponent>(OnDestroyCameraComponent);
            m_Listeners += Cv_EventManager.Instance.AddListener <Cv_Event_DestroyClickableComponent>(OnDestroyClickableComponent);
            m_Listeners += Cv_EventManager.Instance.AddListener <Cv_Event_DestroyRenderComponent>(OnDestroyRenderComponent);
            m_Listeners += Cv_EventManager.Instance.AddListener <Cv_Event_TransformEntity>(OnMoveEntity);
            m_Listeners += Cv_EventManager.Instance.AddListener <Cv_Event_ModifiedRenderComponent>(OnModifiedRenderComponent);
        }
Exemplo n.º 3
0
 public Cv_GameLogic(CaravelApp app)
 {
     Caravel               = app;
     m_random              = new Random();
     m_GameViews           = new List <Cv_GameView>();
     m_SceneManager        = new Cv_SceneManager(app);
     IsProxy               = false;
     Lifetime              = 0;
     ExpectedPlayers       = 0;
     ExpectedAI            = 0;
     ExpectedRemotePlayers = 0;
     HumanPlayersAttached  = 0;
     HumanPlayersLoaded    = 0;
     RemotePlayerId        = 0;
     RenderDiagnostics     = false;
     LastEntityID          = 0;
     State               = Cv_GameState.Initializing;
     Entities            = new Dictionary <Cv_EntityID, Cv_Entity>();
     EntitiesByPath      = new Dictionary <string, Cv_Entity>();
     m_EntitiesToDestroy = new ConcurrentQueue <Cv_Entity>();
     m_EntitiesToAdd     = new ConcurrentQueue <Cv_Entity>();
     m_EntityList        = new List <Cv_Entity>();
 }
Exemplo n.º 4
0
 public void Initialize(CaravelApp app)
 {
     Caravel = app;
 }
Exemplo n.º 5
0
 public static Cv_GamePhysics CreateNullPhysics(CaravelApp app)
 {
     return(new Cv_NullPhysics(app));
 }
Exemplo n.º 6
0
 public Cv_NullPhysics(CaravelApp app) : base(app)
 {
 }
Exemplo n.º 7
0
 internal Cv_SceneManager(CaravelApp caravel)
 {
     m_Scenes     = new Dictionary <Cv_SceneID, Cv_SceneInfo>();
     m_ScenePaths = new Dictionary <string, Cv_SceneInfo>();
     Caravel      = caravel;
 }