예제 #1
0
    void Update()
    {
        if (action != menuOptions.None)//execute the action by activating and deactivating the UIs
        {
            Atack.atacando = true;
            Atack.atack(action, atackScript.enemyCor, atackScript.cor);
            action = menuOptions.None;
        }

        if (atackScript.enemyCor.Ps <= 0 && contador <= 4)
        {
            BattleController.active = false;
            end1.SetActive(true);
            contador += Time.deltaTime;
        }
        if (atackScript.cor.Ps <= 0 && contador <= 4)
        {
            BattleController.active = false;
            //falta cambiar el pokemon y que te ataquen
            end2.SetActive(true);
            contador += Time.deltaTime;
        }
        if (contador > 4)
        {
            //Debug.Log("maaarmotaMediterranea");
            controllerCoremon.applyExpRewardExp(atackScript.cor, atackScript.enemyCor);
            SceneController.loadOverworld();
        }
        if (Atack.atacando)
        {
            action = menu.getActions();                   //Calling the menu controller to open the menu and get an action
        }
        //Do stuff according to the actions received
    }
예제 #2
0
 void Update()
 {
     if (active)
     {
         action = menu.getActions();                   //Calling the menu controller to open the menu and get an action
         if (action != menuOptions.None)
         {
             //Do stuff according to the actions received
             options.actOn(action);
             action = menuOptions.None;
         }
     }
 }
예제 #3
0
        static void Main()
        {
            Application.SetHighDpiMode(HighDpiMode.SystemAware);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            enVars = new environmentVarsCore();

            // Instantiating the delegate for update data from child forms
            updateMainApp = updateMain;

            // set customization option
            enVars.customization.hasCodedCustomizationSettings = true;

            // check for customization file
            if (!LoadCustomizationFile())
            {
                return;
            }

            // check if local settings files exists
            FileInfo settingsFile;

            settingsFile = new FileInfo(Path.Combine(enVars.libraryPath, "settings.eon"));
            settingsFile.Refresh();
            if (enVars.customization.hasLocalSettings & settingsFile.Exists)
            {
                // LOAD LOCAL SETTING
                loadLocalSettings();
            }

            // LOAD CONFIG MENU TREE
            var loadMenu = new menuOptions();

            enVars = loadMenu.Load(enVars);

            // TODO: LOAD USER DEFINED MENU TREE

            // Load assemblies across multiple locations
            var loadAssemblies = new assembliesToLoadClass();

            enVars = loadAssemblies.Load(enVars);
            // TODO: LOAD USER BOUGHT ASSEMBLIES (PACKAGES, WIDGETS, LAYOUTS)
            // loadUserAssemblies()

            // TODO REVIEW
            // LOAD CONFIG API CALL IDS
            loadAPItasksIDs();

            // LOAD CONFIG STATIC TEMPLATE FILES AUTHORIZED
            loadAuthorizedFileTemplates();

            // TODO: CHECK CORE FILES UPDATES
            // check if there are any downloaded core files to be updated

            // LOAD STARTUP FORM
            loadStartupForm();

            // LOAD MAIN LAYOUT ASSEMBLY
            EnvironmentAssembliesLoadClass AssembliesLoader = new EnvironmentAssembliesLoadClass(enVars);

            Type           loadedType;
            FormCustomized mainForm;

            loadedType = AssembliesLoader.LoadObjectTypeFromAssembly(enVars.customization.designLayoutCustomAssemblyFileName, enVars.customization.designLayoutCustomAssemblyNameSpace, "mainAppLayoutForm");
            if (loadedType is null)
            {
                loadedType = AssembliesLoader.LoadObjectTypeFromAssembly(enVars.customization.designLayoutAssemblyFileName, enVars.customization.designLayoutAssemblyNameSpace, "mainAppLayoutForm");
                if (loadedType is null)
                {
                    MessageBox.Show("Error initializing main layout:" + AssembliesLoader.errorMessage);
                    Application.Exit();
                    return;
                }
            }
            //mainForm = Activator.CreateInstance(loadedType, enVars) as FormCustomized;
            // start the main layout
            Application.Run(new mainAppLayoutForm(enVars));
        }
예제 #4
0
        private void wallSwitchPlayerTo(MainWindow.Player player, menuOptions option)
        {
            removeWallInteractionVisual(player);

            if (MainWindow.activeSkeletons.ContainsKey(player.skeleton.TrackingId))
            {
                switch (option)
                {
                    case menuOptions.RecordNewWall:
                        bool stop = false;
                        foreach (var person in MainWindow.activeSkeletons)
                        {
                            if (person.Value.mode == MainWindow.PlayerMode.Create)
                            {
                                stop = true;
                            }
                        }
                        if (!stop)
                        {
                            player.mode = MainWindow.PlayerMode.Create;
                            checkTutorial(MainWindow.Tutorials.RecordNewWall);
                        }
                        break;
                    case menuOptions.CustomWall:
                        player.mode = MainWindow.PlayerMode.Custom;
                        customAudio(player);
                        break;
                    case menuOptions.Sax:
                        player.mode = MainWindow.PlayerMode.Sax;
                        saxAudio(player);
                        break;
                    case menuOptions.Trance:
                        player.mode = MainWindow.PlayerMode.Trance;
                        tranceAudio(player);
                        break;
                    case menuOptions.Metal:
                        player.mode = MainWindow.PlayerMode.Metal;
                        metalAudio(player);
                        break;
                    case menuOptions.EightBit:
                        player.mode = MainWindow.PlayerMode.EightBit;
                        eightBitAudio(player);
                        break;
                    case menuOptions.Animal:
                        player.mode = MainWindow.PlayerMode.Animal;
                        animalAudio(player);
                        break;
                    case menuOptions.Beatbox:
                        player.mode = MainWindow.PlayerMode.Beatbox;
                        beatboxAudio(player);
                        break;
                }
            }
        }