Ejemplo n.º 1
0
 public void OnClickedPlayButton()
 {
     Debug.Log("Loading Game.");
     Clear();
     foreach (Entity entity in playerSpawnSystem.controllers.Values)
     {
         MenuSpawnSystem.SpawnUI(EntityManager, entity, "LoadGame");
     }
 }
Ejemplo n.º 2
0
 public void OnClickedClassChoiceButton(Entity camera, int arrayIndex)
 {
     if (arrayIndex < classes.Count)
     {
         Clear();
         //Debug.LogError("Loading Class [" + data.classes[arrayIndex - 1].name + "].");
         // load race choice now or whatever
         // start game as that character
         //systemsManager.gameStartSystem.newCharacterClass = data.classes[arrayIndex - 1];
         //SetGameState(GameState.LoadNewWorld);
         //int cameraID = characterID; // World.EntityManager.GetComponentData<ZoxID>(CameraSystem.cameras[characterID]).id;
         LoadPlayer(camera, 0, classes[arrayIndex].Value.id);
     }
     else
     {
         //Debug.LogError("Returning to LoadGame.");
         Clear();
         foreach (Entity entity in playerSpawnSystem.controllers.Values)
         {
             MenuSpawnSystem.SpawnUI(EntityManager, entity, "LoadCharacter");
         }
     }
 }
Ejemplo n.º 3
0
        public void Initialize(Unity.Entities.World space)
        {
            // stat bars
            statbarSystem = space.GetOrCreateSystem <StatbarSystem>();
            AddSystemToUpdateList(statbarSystem);
            statBarSystem = space.GetOrCreateSystem <StatbarPositionerSystem>();
            AddSystemToUpdateList(statBarSystem);
            statbarUpdateSystem = space.GetOrCreateSystem <StatBarUpdaterSystem>();
            AddSystemToUpdateList(statbarUpdateSystem);
            trailerPositionerSystem = space.GetOrCreateSystem <TrailerPositionerSystem>();
            AddSystemToUpdateList(trailerPositionerSystem);
            trailerStarterSystem = space.GetOrCreateSystem <TrailerStarterSystem>();
            AddSystemToUpdateList(trailerStarterSystem);
            statbarFaderSystem = space.GetOrCreateSystem <StatBarFaderSystem>();
            AddSystemToUpdateList(statbarFaderSystem);
            damagePopupSystem = space.GetOrCreateSystem <DamagePopupSystem>();
            AddSystemToUpdateList(damagePopupSystem);
            navigateUISystem = space.GetOrCreateSystem <NavigateUISystem>();
            AddSystemToUpdateList(navigateUISystem);
            navigateUICompleterSystem = space.GetOrCreateSystem <NavigateUICompleterSystem>();
            AddSystemToUpdateList(navigateUICompleterSystem);
            gridUISystem = space.GetOrCreateSystem <GridUISystem>();
            AddSystemToUpdateList(gridUISystem);
            navigateStartSystem = space.GetOrCreateSystem <NavigateStartSystem>();
            AddSystemToUpdateList(navigateStartSystem);


            selectedUISystem = space.GetOrCreateSystem <SelectedUISystem>();
            AddSystemToUpdateList(selectedUISystem);
            panelUISystem = space.GetOrCreateSystem <PanelUISystem>();
            AddSystemToUpdateList(panelUISystem);

            // Player UIs
            crosshairSpawnSystem = space.GetOrCreateSystem <CrosshairSpawnSystem>();
            AddSystemToUpdateList(crosshairSpawnSystem);
            actionbarSpawnSystem = space.GetOrCreateSystem <ActionbarSystem>();
            AddSystemToUpdateList(actionbarSpawnSystem);
            inventoryUISpawnSystem = space.GetOrCreateSystem <InventoryUISpawnSystem>();
            AddSystemToUpdateList(inventoryUISpawnSystem);
            equipmentUISpawnSystem = space.GetOrCreateSystem <EquipmentUISpawnSystem>();
            AddSystemToUpdateList(equipmentUISpawnSystem);

            statsUISpawnSystem = space.GetOrCreateSystem <StatsUISpawnSystem>();
            AddSystemToUpdateList(statsUISpawnSystem);

            skillbookUISpawnSystem = space.GetOrCreateSystem <SkillbookUISpawnSystem>();
            AddSystemToUpdateList(skillbookUISpawnSystem);

            dialogueUISpawnSystem = space.GetOrCreateSystem <DialogueUISpawnSystem>();
            AddSystemToUpdateList(dialogueUISpawnSystem);
            dialogueSystem = space.GetOrCreateSystem <DialogueSystem>();
            AddSystemToUpdateList(dialogueSystem);
            questLogUISpawnSystem = space.GetOrCreateSystem <QuestLogUISpawnSystem>();
            AddSystemToUpdateList(questLogUISpawnSystem);
            menuSpawnSystem = space.GetOrCreateSystem <MenuSpawnSystem>();
            AddSystemToUpdateList(menuSpawnSystem);
            renderTextSystem = space.GetOrCreateSystem <RenderTextSystem>();
            AddSystemToUpdateList(renderTextSystem);
            mapUISpawnSystem = space.GetOrCreateSystem <MapUISpawnSystem>();
            AddSystemToUpdateList(mapUISpawnSystem);

            SetLinks();
        }