Ejemplo n.º 1
0
    public void StartGame()
    {
        OpenUIPanel(2);
        ResetEachGame();
        ResetEachRound();
        if (gameMode == GameMode.AI)
        {
            btnManager.CardOne.MyButton.interactable   = false;
            btnManager.CardTwo.MyButton.interactable   = false;
            btnManager.CardThree.MyButton.interactable = false;
        }
        else
        {
            btnManager.CardOne.MyButton.interactable   = true;
            btnManager.CardTwo.MyButton.interactable   = true;
            btnManager.CardThree.MyButton.interactable = true;
        }
        MenuUIManager menu = GetComponent <MenuUIManager>();

        if (menu.source.clip != menu.gameBGM)
        {
            menu.source.clip = menu.gameBGM;
            menu.source.Play();
        }
        gameStart = true;
    }
Ejemplo n.º 2
0
    private void Awake()
    {
        if (UIMenuManager != null)
        {
            Destroy(gameObject);
        }

        UIMenuManager = this;
    }
    public void QuitToMenu()
    {
        MenuUIManager menuUIManager = GameObject.Find("Menu_Canvas").GetComponent <MenuUIManager>();

        menuUIManager.fromCredits = true;

        //load the main menu
        SceneManager.LoadScene("MainMenu");
    }
Ejemplo n.º 4
0
    public override void addStudent(Student student)
    {
        MySqlCommand dbcmd = getDbCommand();

        dbcmd.CommandText = "INSERT INTO students (name, family, mdlname, studgroup, login, password, ipaddress, choosed) VALUES ( '" +
                            student.Name1 + "', '" + student.Family1 + "', '" + student.MdlName1 + "', '" +
                            student.StudGroup1 + "', '" + student.Login1 + "', '" + MenuUIManager.PasswEncryption(student.Password1) +
                            "', '" + student.Ipaddress1 + "', '" + student.Choosed1 + "' )";
        dbcmd.ExecuteNonQuery();
    }
    public void BuildMapTypeMenuStart()
    {
        statusmanager = GameObject.Find("_GameManager").GetComponent <BuildAssetStatusManager> ();
        maindatabase  = GameObject.Find("_GameManager").GetComponent <MainDatabaseManager> ();
        mapmanager    = GameObject.Find("_GameManager").GetComponent <MapManager> ();
        menuuimanager = GetComponent <MenuUIManager> ();
        maindatabase.LoadMapLogicContent();

        LoadBuildMapTypeMenuData();
        menuuimanager.StartMenuUIManager(2, 1);
    }
Ejemplo n.º 6
0
 void Awake()
 {
     if (MenuUIInstance != null && MenuUIInstance != this)
     {
         Destroy(this.gameObject);
     }
     else
     {
         MenuUIInstance = this;
     }
 }
Ejemplo n.º 7
0
    public override int addTeacher(Teacher teacher)
    {
        MySqlCommand dbcmd = getDbCommand();

        dbcmd.CommandText = "INSERT INTO teachers (name, family, mdlname, position, login, password, ipaddress, regtime, choosed) VALUES ( '" +
                            teacher.Name1 + "', '" + teacher.Family1 + "', '" + teacher.MdlName1 + "', '" +
                            teacher.Position1 + "', '" + teacher.Login1 + "', '" + MenuUIManager.PasswEncryption(teacher.Password1) +
                            "', '" + teacher.Ipaddress1 + "', '" + teacher.Regtime1.ToString("yyyy-MM-dd H:mm:ss") + "', '" + teacher.Choosed1 + "' )";
        dbcmd.ExecuteNonQuery();
        return((int)dbcmd.LastInsertedId);
    }
Ejemplo n.º 8
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(gameObject);
         Debug.LogError($"More then a single instance of {GetType()}");
     }
 }
    public void SelectBuildMapMenuStart()
    {
        statusmanager = GameObject.Find("_GameManager").GetComponent <BuildAssetStatusManager> ();
        maindatabase  = GameObject.Find("_GameManager").GetComponent <MainDatabaseManager> ();
        mapmanager    = GameObject.Find("_GameManager").GetComponent <MapManager> ();
        menuuimanager = GetComponent <MenuUIManager> ();
        maindatabase.LoadMapLogicContent();
        maindatabase.LoadMainDatabaseMap();

        LoadBuildAssetMainMenuData();
        LoadGallery();
    }
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
 }
Ejemplo n.º 11
0
        public override void Load()
        {
            HamstarHelpersMod.Instance = this;

            this.LoadConfigs();

            if (!this.HasUnhandledExceptionLogger && this.Config.DebugModeUnhandledExceptionLogging)
            {
                this.HasUnhandledExceptionLogger            = true;
                AppDomain.CurrentDomain.UnhandledException += HamstarHelpersMod.UnhandledLogger;
            }

            this.LoadHelpers = new TmlHelpers.LoadHelpers();
            this.Promises    = new Promises();

            this.Timers                    = new Timers();
            this.LogHelpers                = new DebugHelpers.LogHelpers();
            this.ModMetaDataManager        = new TmlHelpers.ModMetaDataManager();
            this.BuffHelpers               = new BuffHelpers.BuffHelpers();
            this.NetHelpers                = new NetHelpers.NetHelpers();
            this.ItemIdentityHelpers       = new ItemHelpers.ItemIdentityHelpers();
            this.NPCIdentityHelpers        = new NPCHelpers.NPCIdentityHelpers();
            this.ProjectileIdentityHelpers = new ProjectileHelpers.ProjectileIdentityHelpers();
            this.BuffIdentityHelpers       = new BuffHelpers.BuffIdentityHelpers();
            this.NPCBannerHelpers          = new NPCHelpers.NPCBannerHelpers();
            this.RecipeHelpers             = new RecipeHelpers.RecipeHelpers();
            this.TmlPlayerHelpers          = new TmlHelpers.TmlPlayerHelpers();
            this.WorldHelpers              = new WorldHelpers.WorldHelpers();
            this.ControlPanel              = new UIControlPanel();
            this.ModLockHelpers            = new TmlHelpers.ModHelpers.ModLockHelpers();
            this.EntityGroups              = new EntityGroups();
            this.PlayerMessages            = new PlayerMessages();
            this.Inbox           = new InboxControl();
            this.ModVersionGet   = new ModVersionGet();
            this.ServerBrowser   = new ServerBrowserReporter();
            this.MenuItemMngr    = new MenuItemManager();
            this.MenuUIMngr      = new MenuUIManager();
            this.OldMenuItemMngr = new Utilities.Menu.OldMenuItemManager();
            this.MusicHelpers    = new MusicHelpers();

#pragma warning disable 612, 618
            TmlHelpers.AltNPCInfo.DataInitialize();
            TmlHelpers.AltProjectileInfo.DataInitialize();
#pragma warning restore 612, 618

            if (!this.Config.DisableControlPanelHotkey)
            {
                this.ControlPanelHotkey = this.RegisterHotKey("Mod Helpers Control Panel", "O");
            }

            this.LoadModData();
        }
Ejemplo n.º 12
0
    private void Start()
    {
        // 싱글톤 변수 할당
        UManager = MenuUIManager.instance;
        OManager = InMenuObjectManager.instance;

        // 현재 플레이어 변수 초기화
        MasterPlayerReady = false;
        AllPlayerReady    = new bool[4];
        if (MenuNetwork.LeaveRoom())
        {
            SetMenuActive(1, null);
        }
    }
Ejemplo n.º 13
0
        public override void Unload()
        {
            this.UnloadModData();

            this.Promises.FulfillModUnloadPromises();

            try {
                if (this.HasUnhandledExceptionLogger)
                {
                    this.HasUnhandledExceptionLogger            = false;
                    AppDomain.CurrentDomain.UnhandledException -= HamstarHelpersMod.UnhandledLogger;
                }
            } catch { }

            this.ExceptionMngr             = null;
            this.Timers                    = null;
            this.ConfigJson                = null;
            this.PacketProtocols           = null;
            this.LogHelpers                = null;
            this.ModMetaDataManager        = null;
            this.BuffHelpers               = null;
            this.NetHelpers                = null;
            this.ItemIdentityHelpers       = null;
            this.NPCIdentityHelpers        = null;
            this.ProjectileIdentityHelpers = null;
            this.BuffIdentityHelpers       = null;
            this.NPCBannerHelpers          = null;
            this.RecipeHelpers             = null;
            this.TmlPlayerHelpers          = null;
            this.LoadHelpers               = null;
            this.ModVersionGet             = null;
            this.WorldHelpers              = null;
            this.ModLockHelpers            = null;
            this.EntityGroups              = null;
            this.AnimatedColors            = null;
            this.PlayerMessages            = null;
            this.Inbox = null;
            this.ControlPanelHotkey = null;
            this.ControlPanel       = null;
            this.ServerBrowser      = null;
            this.MenuItemMngr       = null;
            this.MenuUIMngr         = null;
            this.OldMenuItemMngr    = null;
            this.MusicHelpers       = null;
            this.Promises           = null;

            HamstarHelpersMod.Instance = null;
        }
Ejemplo n.º 14
0
    public override int getNumberRunningSessions()
    {
        MySqlCommand dbcmd       = getDbCommand();
        var          minDateTime = MenuUIManager.MinDateTime().ToString("yyyy-MM-dd H:mm:ss");

        dbcmd.CommandText = "SELECT * FROM sessions WHERE convert(endtime,datetime) <= convert('" + minDateTime + "',datetime);";
        var reader     = dbcmd.ExecuteReader();
        int numRecords = 0;

        while (reader.Read())
        {
            numRecords++;
        }
        reader.Close();
        return(numRecords);
    }
Ejemplo n.º 15
0
    private void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
        }
        else
        {
            throw new Exception();
        }

        if (StaticData.isOpenStage10)
        {
            this.stage10KeyInputField.gameObject.SetActive(false);
            this.stage10LockIcon.SetActive(false);
        }
    }
    //public List< List<ScrollPanel>> CurrentLevelList = new List< List<ScrollPanel>> ();


    public void HorizontalScrollUIStart(HorizontalScrollUI horizontalscroll)
    {
        ParentPanel          = this.transform.parent.gameObject;
        menuuimanager        = ParentPanel.GetComponent <MenuUIManager> ();
        CurrentSelectionList = new List <int> ();
        Currentscroll        = horizontalscroll;


        if (IsMenuCreated == true)
        {
            UpdateHorizontalScrollMenu();
        }
        else
        {
            LoadMenuElement();
        }
    }
Ejemplo n.º 17
0
    void Start()
    {
        if (instance == null)
        {
            instance = this;
        }
        else
        {
            Destroy(transform.gameObject);
        }

        playButton.onClick.AddListener(OpenLevelPanel);
        settingButton.onClick.AddListener(OpenSettingPanel);
        helpButton.onClick.AddListener(OpenHelpPanel);
        exitButton.onClick.AddListener(ExitGame);
        foreach (var i in levelBackButtons)
        {
            i.onClick.AddListener(BackToWorld);
        }
        BackToMenu();
    }
Ejemplo n.º 18
0
    public void startSessions()
    {
        int currTaskId = -1;

        foreach (LabBlock labBlock in labBlocks)
        {
            if (labBlock.toggleButton.IsOn)
            {
                currTaskId = labBlock.taskId;
            }
        }
        ;
        if (currTaskId == -1)
        {
            MenuUIManager.Instance.SendPopup(3, "Необходимо выбрать одну из задач");
            return;
        }
        choosedStudentsForLab.Clear();
        foreach (ChangableButton studentChangableButton in studentChangableButtons)
        {
            if (studentChangableButton.IsActive)
            {
                choosedStudentsForLab.Add(studentChangableButton.studentId);
            }
        }
        DateTime currTime = DateTime.Now;

        choosedStudentsForLab.ForEach(choosedStudentForLab =>
        {
            Session newSession = new Session(MenuUIManager.currTeacherId, choosedStudentForLab, currTaskId,
                                             currTime, MenuUIManager.MinDateTime());
            var sessionsDB = new SessionsDB();
            sessionsDB.addSession(newSession);
            sessionsDB.close();
        });
        OpenTaskPanelMainMenu();
    }
Ejemplo n.º 19
0
    void EnterButton()
    {
        var teachersDB   = new TeachersDB();
        var currPassword = MenuUIManager.PasswEncryption(passw.text);
        var reader       = teachersDB.findTeacher(login.text);

        if (reader.HasRows)
        {
            reader.Read();
            if (reader[1].ToString() == currPassword)
            {
                MenuUIManager.currTeacherId = Convert.ToInt32(reader[0]);
                MenuUIManager.Instance.OpenTaskPanel();
            }
            else
            {
                Debug.Log("Введенные логин и пароль не соответствуют друг другу");
            }
        }
        else
        {
            Debug.Log("Введенный логин не найден в БД");
        }
    }
Ejemplo n.º 20
0
    public int CurrentElementCount;     //how many elements in total



    public void StartGalleryManager(GalleryUI gallery)
    {
        ParentPanel   = this.transform.parent.gameObject;
        menuuimanager = ParentPanel.GetComponent <MenuUIManager> ();

        GallerySize      = 10;
        CurrentGalleryUI = gallery;

        if (IsGalleryCreated == true)
        {
            UpdateGalleryManager();
        }
        else
        {
            CurrentPage = 1;
            SetOptionButton();
            LoadGalleryData();
            DisableOptionButtonArray();
        }

        /*if (CurrentGalleryUI.ID != -1) {
         *
         * } */
    }
Ejemplo n.º 21
0
 private void Awake()
 {
     // 자기 스크립트 싱글톤 설정
     instance = this;
 }
Ejemplo n.º 22
0
 private void Awake()
 {
     m_UIManager = GameObject.Find("UIManager").GetComponent <MenuUIManager>();
 }
Ejemplo n.º 23
0
    // Use this for initialization
    void Awake()
    {
        //set variables
        manager = this;

        //set object links
        ball = GameObject.Find("Ball").GetComponent<Ball>();
        score = GameObject.Find("Score").GetComponent<Score>();
        backgroundSlider = GameObject.Find("Scripts").GetComponent<BG_Slider> ();
        backgroundSound = GameObject.Find("Scripts").GetComponent<AudioSource>();
        menuUI = GameObject.Find("MenuUI Canvas").GetComponent<MenuUIManager>();
        coinCounterUI = GameObject.Find("CoinCounter").GetComponent<Text> ();

        if(GameObject.Find("AdColonyAdManager") != null) {
            adColonyAdManager = GameObject.Find("AdColonyAdManager").GetComponent<AdColonyManager>();
            adColonyAdManager.setGameManager(manager);
        }

        //Check if scene loaded into from the "store"
        //If coming back from the "Store" TextureSwapData exists, set the ball material to the new picked material
        if (GameObject.Find ("TextureSwapData") != null) {

            TextureSwapData textureData = GameObject.Find ("TextureSwapData").GetComponent<TextureSwapData> ();
            ball.GetComponent<Renderer>().sharedMaterial = textureData.pickedMaterial;
            Destroy (textureData.gameObject);
        }
        else {
            Debug.Log("Loaded into scene from somewhere other than the Store, not swaping ball texture");
        }

        //get reference to the AppManager
        if(GameObject.Find("AppManager") != null){
            appManager = GameObject.Find("AppManager").GetComponent<AppManager>();

            //only loads the saved data the first time called
            if(appManager.gameManagerNeedsUpdating){
                appManager.gameManagerNeedsUpdating = false;

                coinsCollected = appManager.loadedCoins;
                menuUI.setHighScoreOnLoad(appManager.loadedHighScore);
                ball.GetComponent<Renderer>().sharedMaterial = appManager.loadedMaterial;

                CoinUIUpdated();
            }
        }
    }
 private void Start()
 {
     _menuUIManager = transform.root.GetComponent <MenuUIManager>();
 }
Ejemplo n.º 25
0
 public void PlayAgainClick()
 {
     Application.LoadLevel("Game");
     MenuUIManager.configureGameConfig(GameConfig.difficulty);
 }
Ejemplo n.º 26
0
 private void LoadGallery()
 {
     menuuimanager = GetComponent <MenuUIManager> ();
     menuuimanager.StartMenuUIManager(1, 1);
 }