Esempio n. 1
0
    public bool configure(StoreItemStruct storeItemStruct)
    {
        init();
        weaponCode = storeItemStruct.weaponCode;
        quality    = storeItemStruct.quality;
        style      = storeItemStruct.style;
        price      = storeItemStruct.price;
        name       = storeItemStruct.name;

        priceText.text  = LanguageSystem.GET_CURRENCY() + price;
        weaponName.text = name;
        frame.color     = arraysData.qualityColors[quality];
        image.sprite    = getImg(weaponCode, style);

        if (haveBought())
        {
            disableButton();
        }

        if (price <= 0)
        {
            Destroy(gameObject);
            return(false);
        }

        return(true);
    }
 public void setToRed()
 {
     isGreen = false;
     GetComponent <Image>().color        = CancelButtonColor;
     textObj.GetComponent <Text>().color = CancelLabelColor;
     textObj.GetComponent <Text>().text  = LanguageSystem.GET_CANCEL_SEARCH_BUTTON_LABEL();
 }
Esempio n. 3
0
 private void setStatus()
 {
     wins_me.GetComponent <Text>().text    = PlayerPrefs.GetInt("total_wins", 0) + "";
     money_me.GetComponent <Text>().text   = LanguageSystem.GET_CURRENCY() + PlayerPrefs.GetInt("money", 0);
     rank_me.GetComponent <Image>().sprite = rankList[PlayerPrefs.GetInt("rank", 4)];
     name_me.GetComponent <Text>().text    = PlayerPrefs.GetString("name", LanguageSystem.GET_NAME());
 }
 public void setToGreen()
 {
     GetComponent <Image>().color        = StartButtonColor;
     textObj.GetComponent <Text>().color = StartLabelColor;
     textObj.GetComponent <Text>().text  = LanguageSystem.GET_START_SEARCH_BUTTON_LABEL();
     isGreen = true;
 }
Esempio n. 5
0
        private static ModStrings LoadLanguage <T>(string mod) where T : ModStrings
        {
            //  == Load the language settings == //
            LanguageSystem.GetCurrentSystemLanguageInfo();
            var currentLang = LanguageSystem.CultureInfo.Name;

            Log.Info(Path.Combine(Information.LANGUAGEDIRECTORY, $"{mod}.json"));


            var languages = LanguageSystem.LoadCurrentRegion <T>(Path.Combine(Information.LANGUAGEDIRECTORY, $"{mod}.json"));


            if (languages != null)
            {
                Log.Info(languages.Count.ToString());

                var modStrings = languages.Single(x => x.Region.Equals(currentLang));

                if (modStrings != null)
                {
                    return(modStrings);
                }
            }
            else
            {
                Log.Info($"Load Current Region returned null");
            }
            return(null);
        }
Esempio n. 6
0
 public void setStatus()
 {
     wins.GetComponent <Text>().text    = PlayerPrefs.GetInt("total_wins", 0) + "";
     money.GetComponent <Text>().text   = LanguageSystem.GET_CURRENCY() + PlayerPrefs.GetInt("money", 0);
     rank.GetComponent <Image>().sprite = rankList[PlayerPrefs.GetInt("rank", 4)];
     name.GetComponent <Text>().text    = PlayerPrefs.GetString("name", LanguageSystem.GET_PLAYER_STATUS_NO_NAME_ME());
     pp.GetComponent <Image>().sprite   = arraysData.ppList[PlayerPrefs.GetInt("pp", 2)];
 }
Esempio n. 7
0
 public void setT()
 {
     panel.SetActive(true);
     text.GetComponent <Text>().color   = T_TEXT_COLOR;
     panel.GetComponent <Image>().color = T_PANEL_COLOR;
     text.GetComponent <Text>().text    = LanguageSystem.GET_END_ROUND_PANEL_LABEL_T_WIN();
     panel.SetActive(true);
 }
Esempio n. 8
0
 private void setLabels()
 {
     titleLabel.text             = LanguageSystem.GET_MORE_PLAYS_MENU_TITLE();
     buyUnlimitedPlaysLabel.text = LanguageSystem.GET_MORE_PLAYS_MENU_BUTTON_LABEL_BUY_NO_PLAYS();
     buy20PlaysLabel.text        = LanguageSystem.GET_MORE_PLAYS_MENU_BUTTON_LABEL_BUY_20_PLAYS();
     watchAdLabel.text           = LanguageSystem.GET_MORE_PLAYS_MENU_BUTTON_LABEL_WATCH_AD();
     closeLabel.text             = LanguageSystem.GET_MORE_PLAYS_MENU_BUTTON_LABEL_CLOSE();
 }
Esempio n. 9
0
    IEnumerator setT()
    {
        yield return(new WaitForEndOfFrame());

        text.GetComponent <Text>().color   = T_TEXT_COLOR;
        panel.GetComponent <Image>().color = T_PANEL_COLOR;
        text.GetComponent <Text>().text    = LanguageSystem.GET_END_ROUND_PANEL_LABEL_T_WIN();
    }
Esempio n. 10
0
 public void accept()
 {
     parent.GetComponent <Launcher>().acceptGame();
     accept_button.GetComponent <Button>().interactable = false;
     accept_text.GetComponent <Text>().text             = LanguageSystem.GET_SEARCH_GAME_MENU_BUTTON_LABEL_ACCEPTED();
     accept_text.GetComponent <Text>().color            = new Color32(37, 227, 0, 255);
     accepted = true;
 }
Esempio n. 11
0
 private void init()
 {
     initWidth();
     arraysData         = GameObject.Find(MainMenu.ArraysDataName).GetComponent <ArraysData>();
     buyButtonText.text = LanguageSystem.GET_STORE_BUY_BUTTON_LABEL();
     awpImgs            = arraysData.awpImgs;
     knifeImgs          = arraysData.knifeImgs;
     zeusImgs           = arraysData.zeusImgs;
 }
Esempio n. 12
0
    // Start is called before the first frame update
    void Start()
    {
        parrent = GameObject.Find("Canvas");
        gameObject.transform.SetParent(parrent.transform, false);

        button_negLabel.text = LanguageSystem.GET_SET_TEAM_NAMES_MENU_BUTTON_LABEL_CLOSE();
        button_posLabel.text = LanguageSystem.GET_SET_TEAM_NAMES_MENU_BUTTON_LABEL_SET_TEAM();
        titleLabel.text      = LanguageSystem.GET_SET_TEAM_NAMES_MENU_TITLE();
    }
Esempio n. 13
0
 public void Start()
 {
     title_text.text     = LanguageSystem.GET_EQUIP_MENU_TITLE();
     btnBoth_text.text   = LanguageSystem.GET_EQUIP_MENU_BUTTON_LABEL_BOTH();
     btnT_text.text      = LanguageSystem.GET_EQUIP_MENU_BUTTON_LABEL_T();
     btnCT_text.text     = LanguageSystem.GET_EQUIP_MENU_BUTTON_LABEL_CT();
     btnCancel_text.text = LanguageSystem.GET_EQUIP_MENU_BUTTON_LABEL_CANCEL();
     GameObject.Find("ScrollInventory").GetComponent <myInventroy>().isChoseMenuOpen = true;
 }
Esempio n. 14
0
 public void setSearching(bool isSearching)
 {
     setSearchinActive(isSearching);
     if (isSearching)
     {
         progressLabel.GetComponent <TextLoading>().setNewText(LanguageSystem.GET_IS_SEARCHING_PLAYER_LABEL());
         Invoke(nameof(searchForOtherRooms), waitTimeForSearchAgain);
     }
 }
Esempio n. 15
0
 private void setIsConnecting(bool isCon)
 {
     setSearchinActive(isCon);
     isConnecting = isCon;
     if (isCon)
     {
         progressLabel.GetComponent <TextLoading>().setNewText(LanguageSystem.GET_IS_CONNECTING_LABEL());
     }
 }
Esempio n. 16
0
 public void openPanel(bool isInventory)
 {
     inventoryLayout.SetActive(isInventory);
     storeLayout.SetActive(!isInventory);
     storeInventoryButtonText.text = isInventory ? LanguageSystem.GET_STORE_TAB_BUTTON_LABEL() : LanguageSystem.GET_INVENTORY_TAB_BUTTON_LABEL();
     if (isInventory)
     {
         StartCoroutine(inventoryLayout.GetComponent <myInventroy>().reload());
     }
 }
Esempio n. 17
0
        public MainForm()
        {
            InitializeComponent();

            Size = MinimumSize;
            panel_mainmenu.Dock     = panel_autologin.Dock = panel_settings.Dock = DockStyle.Fill;
            panel_autologin.Visible = panel_settings.Visible = false;

            _l = new LanguageSystem();
        }
Esempio n. 18
0
 private void setButtonsLabel()
 {
     btnRankedLabel.text          = LanguageSystem.GET_RANKED_BUTTON_LABEL();
     btnRankedOfflineLabel.text   = LanguageSystem.GET_RANKED_OFFLINE_BUTTON_LABEL();
     btnTeamEditorLabel.text      = LanguageSystem.GET_TEAM_EDITOR_BUTTON_LABEL();
     btnInventoryLabel.text       = LanguageSystem.GET_INVENTORY_BUTTON_LABEL();
     btnRemoveAdsLabel.text       = LanguageSystem.GET_REMOVE_ADS_BUTTON_LABEL();
     btnMoreCoinsLabel.text       = LanguageSystem.GET_MORE_COIN_BUTTON_LABEL();
     btnRestorePurchaseLabel.text = LanguageSystem.GET_RESTORE_PURCHASE_BUTTON_LABEL();
 }
Esempio n. 19
0
 private void setProductsLabel()
 {
     _2kProductLabel.text   = _2k + " " + LanguageSystem.GET_PRICE_LIST_MENU_COIN();
     _5kProductLabel.text   = _5k + " " + LanguageSystem.GET_PRICE_LIST_MENU_COIN();
     _10kProductLabel.text  = _10k + " " + LanguageSystem.GET_PRICE_LIST_MENU_COIN();
     _25kProductLabel.text  = _25k + " " + LanguageSystem.GET_PRICE_LIST_MENU_COIN();
     _50kProductLabel.text  = _50k + " " + LanguageSystem.GET_PRICE_LIST_MENU_COIN();
     _100kProductLabel.text = _100k + " " + LanguageSystem.GET_PRICE_LIST_MENU_COIN();
     _bestSellerLabel.text  = LanguageSystem.GET_PRICE_LIST_MENU_BEST_SELLER();
     _closeLabel.text       = LanguageSystem.GET_PRICE_LIST_MENU_CLOSE();
 }
Esempio n. 20
0
        public MainForm()
        {
            InitializeComponent();

            // ReSharper disable once VirtualMemberCallInContructor
            Size = MinimumSize;
            panel_mainmenu.Dock     = panel_autologin.Dock = panel_settings.Dock = DockStyle.Fill;
            panel_autologin.Visible = panel_settings.Visible = false;

            _l = new LanguageSystem();
        }
Esempio n. 21
0
 // Start is called before the first frame update
 void Start()
 {
     accept_text.GetComponent <Text>().text = LanguageSystem.GET_SEARCH_GAME_MENU_BUTTON_LABEL_ACCEPT();
     title_text.GetComponent <Text>().text  = LanguageSystem.GET_SEARCH_GAME_MENU_TITLE();
     GetComponent <AudioSource>().PlayOneShot(matchFoundAC);
     parent = GameObject.Find("Main Camera");
     canvas = GameObject.Find("Canvas");
     gameObject.transform.SetParent(canvas.transform, false);
     accepted = false;
     decSec();
 }
Esempio n. 22
0
    public void show(int weaponCode, int style, string playersName)
    {
        Debug.Log("weaponCode: " + weaponCode + " style: " + style);
        arraysData = GameObject.Find(MainMenu.ArraysDataName).GetComponent <ArraysData>();
        StoreItemStruct itemStruct = InventoryMenu.getStruct(listWeapon, weaponCode, style);

        image.sprite      = getSprite(weaponCode, style);
        qualityLine.color = arraysData.qualityColors[itemStruct.quality];
        weaponName.text   = itemStruct.name;
        title.text        = LanguageSystem.GET_SHOW_WEAPON_PANEL_TITLE_START() + " " + playersName + LanguageSystem.GET_SHOW_WEAPON_PANEL_TITLE_MIDDLE() + " " + LanguageSystem.GET_SHOW_WEAPON_PANEL_TITLE_END();
    }
Esempio n. 23
0
    private void refreshPlays()
    {
        Debug.Log("ADTEST + refreshPlays: " + PlayerPrefs.HasKey("isPlays"));
        if (PlayerStatus.isPlaysRemoved())
        {
            plays_me.GetComponent <Text>().text = LanguageSystem.GET_INFINITY();
            plays = Int32.MaxValue;
            return;
        }

        plays = PlayerPrefs.GetInt("plays", 3);
        plays_me.GetComponent <Text>().text = "" + plays;
    }
    void Update()
    {
        if (UserSystem.Instance.gameDataServerConnectionMode != GameDataServerConnectionMode.StartUp && !musicAudioSource.isPlaying)
        {
            musicAudioSource.Play();
        }
        if (HasFullyLoaded() && isInitializing)
        {
            loadingScreenObject.SetActive(false);
            mainMenuObject.SetActive(true);

            isInitializing = false;
        }
        else if (UserSystem.Instance.loadErrorOccured && isInitializing) // Check all important things here
        {
            loadingText.text = LanguageSystem.Get("Central servers not reachable");
            Debug.LogError("Central servers not reachable");

            isInitializing = false;
        }
        else if (SettingsSystem.Instance.loadErrorOccured && isInitializing)
        {
            loadingText.text = LanguageSystem.Get("Settings couldnt get loaded");
            Debug.LogError("Settings couldnt get loaded");

            isInitializing = false;
        }

        if (isInitializing)
        {
            loadingText.text = LanguageSystem.Get("Loading");
        }

        if (UserSystem.Instance.gameDataServerConnectionMode == GameDataServerConnectionMode.Aborted)
        {
            reconnectButtonText.text = LanguageSystem.Get("Reconnect");
            reconnectButton.gameObject.SetActive(true);
        }
        else
        {
            reconnectButton.gameObject.SetActive(false);
        }

        if (!isInitializing)
        {
            gameDataServerStateText.text = LanguageSystem.Get(UserSystem.Instance.gameDataServerConnectionMode.ToString());
            usernameText.text            = UserSystem.Instance.caseomaticUsername;
        }

        SetAbsoluteProgressbarValue();
    }
Esempio n. 25
0
    public static void addMoney(int extra)
    {
        int money = PlayerPrefs.GetInt("money", 0) + extra;

        PlayerPrefs.SetInt("money", money);
        GameObject[] coinObjects = GameObject.FindGameObjectsWithTag("UI_coin");
        foreach (var coinObject in coinObjects)
        {
            Text txt = coinObject.GetComponent <Text>();
            if (txt != null)
            {
                txt.text = LanguageSystem.GET_CURRENCY() + money;
            }
        }
    }
Esempio n. 26
0
    private void setStatus()
    {
        wins  = PlayerPrefs.GetInt("total_wins", 0);
        money = PlayerPrefs.GetInt("money", 0);
        rank  = PlayerPrefs.GetInt("rank", 4);
        name  = PlayerPrefs.GetString("name", "Name");
        ppId  = PlayerPrefs.GetInt("pp", 2);

        wins_me.GetComponent <Text>().text    = "" + wins;
        money_me.GetComponent <Text>().text   = LanguageSystem.GET_CURRENCY() + money;
        rank_me.GetComponent <Image>().sprite = rankList[rank];
        name_me.GetComponent <Text>().text    = name;
        pp_me.GetComponent <Image>().sprite   = arraysData.ppList[ppId];
        refreshPlays();
    }
Esempio n. 27
0
 void Start()
 {
     game      = GameObject.Find("MOVABLE").GetComponent <GameScript>();
     money     = GameObject.Find("Money").GetComponent <GameMoney>();
     container = GameObject.Find("SafeArea");
     setButtonsName();
     gameObject.transform.SetParent(container.transform, false);
     zeusPriceText.text  = LanguageSystem.GET_CURRENCY() + zeusPrice;
     flashPriceText.text = LanguageSystem.GET_CURRENCY() + flashPrice;
     kitPriceText.text   = LanguageSystem.GET_CURRENCY() + kitPrice;
     if (game.isT)
     {
         kitButton.SetActive(false);
     }
     checkcanBuyItem();
 }
Esempio n. 28
0
 public void Disconnect()
 {
     him.SetActive(false);
     if (PhotonNetwork.IsConnected)
     {
         progressLabel.GetComponent <TextLoading>().setNewText(LanguageSystem.GET_IS_DISCONNECTING_LABEL());
         PhotonNetwork.Disconnect();
     }
     else
     {
         progressLabel.SetActive(false);
         if (isLeftingScene)
         {
             leftScene();
         }
     }
 }
Esempio n. 29
0
    void Start()
    {
        if (GameObject.Find(MainMenu.ArraysDataName) == null)
        {
            SceneManager.LoadScene("Assets/Scenes/Main Menu.unity", LoadSceneMode.Single);
            return;
        }

        arraysData = GameObject.Find(MainMenu.ArraysDataName).GetComponent <ArraysData>();
        startedCoroutineBombKnife   = new Queue <Coroutine>();
        Application.targetFrameRate = 300;

        online = gameObject.GetComponent <GameScriptOnline>();
        GameObject data = GameObject.Find("Data");

        isOnline = data != null;
        if (isOnline)
        {
            EndGameShow.addPlays(-1);
            online_data = data.GetComponent <OnlineData>();
            strategy    = Online.WRITE;
            rank        = (PlayerPrefs.GetInt("rank", 4) + online_data.rank_him) / 2;
        }
        else
        {
            rank     = PlayerPrefs.GetInt("rank", 4);
            strategy = Online.OFFLINE;
            hideOnlineObjects();
        }
        isT = isOnline? online_data.getTeam() : Random.Range(0, 2) == 1;
        initializeMyTeam();
        gameMode       = 0;
        enemysNameList = new List <String>();
        kills          = 0;
        round          = (WIN_SCORE - round_per_half);
        ctScore        = round / 2;
        tScore         = round - ctScore;
        yourName       = PlayerPrefs.GetString("name", LanguageSystem.GET_NAME());
        maxLooks       = isT ? T_aimPoints.Length : CT_aimPoints.Length;
        getEnemySpawn().initEnemysFirstNameList(START_ENEMY_COUNT, isOnline);
        newTeam();
        resetLook();

        beforeNewRound();
    }
Esempio n. 30
0
 public void configure(bool ctIsDeath, int weaponCode, bool isHeadShot, bool isWall, String killerName, String killedName)
 {
     if (PlayerPrefs.GetString("name", LanguageSystem.GET_NAME()).Equals(killerName))
     {
         // you killed
         GetComponent <Image>().color = new Color32(142, 42, 52, 64);
     }
     if (PlayerPrefs.GetString("name", LanguageSystem.GET_NAME()).Equals(killedName))
     {
         // you death
         GetComponent <Image>().color = new Color32(200, 62, 75, 128);
     }
     killerNameLabel.GetComponent <Text>().text = killerName + "  ";
     killedNameLabel.GetComponent <Text>().text = "  " + killedName;
     headImg.SetActive(isHeadShot);
     wallImg.SetActive(isWall);
     weopenImg.GetComponent <Image>().sprite = weapons[weaponCode];
     StartCoroutine(AdjustTransInTheEndOfFrame(ctIsDeath));
 }