Beispiel #1
0
 public void AddTabsWithGameText(string text, int cnt)
 {
     for (var i = 0; i < cnt; i++)
     {
         AddTabObj(GameText.GetStr(text + i));
     }
 }
Beispiel #2
0
        public static void Reload()
        {
            if (!GameText.Exists)
            {
                GameText.CreateInstance();
            }

            var gameTextInfo = GameTextLanguage.GameTextInfos.ElementAtOrDefault(GameTextLanguage.Prefs.selection);

            if (gameTextInfo != null)
            {
                GameText.Instance.LoadFromResources(gameTextInfo.AssetPath);
            }

            var gameObjects = UnityEditorUtility.FindAllObjectsInHierarchy();

            foreach (var gameObject in gameObjects)
            {
                var setter = gameObject.GetComponent <GameTextSetter>();

                if (setter != null)
                {
                    setter.ImportText();
                }
            }

            IsLoaded = true;
        }
Beispiel #3
0
        private void showScore()
        {
            var scoreText = new GameText("+1");

            scoreText.position = position;
            scene.addEntity(scoreText);

            var moveTween = scoreText.tweenPositionTo(position + new Vector2(0, -40), deathDuration);

            moveTween.setEaseType(EaseType.QuadOut);
            moveTween.start();

            var opacityTween = new FloatTween(scoreText, 0f, deathDuration - 0.3f);

            opacityTween.setEaseType(EaseType.QuadOut);
            opacityTween.setDelay(0.3f);
            opacityTween.start();

            Core.schedule(deathDuration, t => {
                if (scene != null)
                {
                    scoreText?.destroy();
                }
            });
        }
Beispiel #4
0
    void Awake()
    {
        if (key.Length == 0)
        {
            LogSys.LogWarning("key is empty");
            return;
        }
        string str = "";

        if (FromLua == false || !sluaAux.luaSvrManager.getInstance().IsLoaded)
        {
            str = GameText.GetStr(key);
        }
        else
        {
            SLua.LuaState ls = sluaAux.luaSvrManager.getInstance().GetLuaState();
            if (ls != null)
            {
                SLua.LuaTable tb = ls.getTable("LuaText");
                if (tb[key] == null)
                {
                    str = GameText.GetStr(key);
                }
                else
                {
                    str = tb[key].ToString();
                }
            }
        }
        gameObject.GetComponent <UILabel>().text = UtilTools.Wrap(str);
    }
 static void Initialize()
 {
     bInitialize         = true;
     PointLineFont       = Game1.contentManager.Load <SpriteFont>(@"Fonts\Design\BGUI\test32");
     pointsGainedText    = new GameText("Points gained: ");
     pointsGainedLinePos = new Rectangle(1366 / 2 - 1100 / 2, 700, 1100, 50);
 }
Beispiel #6
0
        /// <summary>
        /// Получить текст
        /// </summary>
        /// <returns></returns>
        public TextData Get()
        {
            TextData result = null;

            List <TextData> activeList = OnlyActual(first, active);

            //List<TextData> activeList = active;

            if (active.Count > 0)
            {
                result = activeList.Random();
            }
            else
            {
                GameText.AddType(reserveType);
                return(GameText.Get(reserveType));
            }


            active.Remove(result);
            first.Add(result.text[0].ToString());
            notActive.Add(result);

            return(result);
        }
Beispiel #7
0
    protected override void ReplaceAwake()
    {
        _ctrl                 = UIManager.GetControler <RegisterBindingController>();
        _btnClose             = FindGameObject("Container/bg/btnClose");
        _phoneInput           = FindComponent <UIInput>("Container/phone/Sprite");
        _passwordInput        = FindComponent <UIInput>("Container/password/Sprite");
        _verifyInput          = FindComponent <UIInput>("Container/verify/Sprite");
        _btnGetverifyCode     = FindGameObject("Container/verify/btnVerify");
        _btnGetverifyCodeGray = FindGameObject("Container/verify/btnVerifyGray");
        _btnGetverifyCodeLb   = FindComponent <UILabel>("Container/verify/btnVerifyGray/Label");
        _btnSure              = FindGameObject("Container/btnSure");
        //_verifyBtnSpr = _btnGetverifyCode.GetComponent<UISprite>();

//        _phoneInput.activeTextColor = new Color(dc661f);
        _phoneInput.defaultText    = GameText.GetStr("login_name_default");
        _passwordInput.defaultText = GameText.GetStr("reset_passWord_default");
        _verifyInput.defaultText   = GameText.GetStr("verify_default");
        if (_ctrl.cooldownEndTime - UtilTools.GetClientTime() > 0)
        {
            _bUpdateCooldwon = true;
            SetVerifyShow(true);
        }
        else
        {
            SetVerifyShow(false);
        }
    }
Beispiel #8
0
    private void OnSureRegisterOrBinder(GameObject go)
    {
        //TODO 确定注册或者绑定
        string phoneNum = _phoneInput.value;
        string password = _passwordInput.value;

        if (!IsPhoneNum(phoneNum))
        {
            UtilTools.MessageDialog(GameText.GetStr("please_input_right_phone_num"));
            return;
        }
        if (!IsPassword(password))
        {
            UtilTools.MessageDialog(GameText.GetStr("reset_passWord_default"));
            return;
        }
        string verifyCode = _verifyInput.value;

        if (_ctrl.isBinding)
        {
            LoginInputController.startUpMono.PhoneBind(phoneNum, password, verifyCode);
//            UtilTools.ShowWaitWin(WaitFlag.BindPhone, 5f);
        }
        else
        {
            LoginInputController.startUpMono.PhoneRegister(phoneNum, password, verifyCode);
//            UtilTools.ShowWaitWin(WaitFlag.RegisterAccount, 5f);
        }
    }
Beispiel #9
0
    public override void OnComplete()
    {
        GameManager.Instance.ui_ticker.Write(GameText.GetText("ACHIEVE/COMPLETE", name));

        if (metas.Count >= step + 1)
        {
            Meta meta = metas[step];
            name  = meta.name;
            step  = meta.step;
            count = count - goal;
            goal  = meta.goal;
            Database.Execute(Database.Type.UserData,
                             "UPDATE user_achieve SET achieve_name='" + name + "', achieve_step=" + step + ", achieve_count=" + count + ", achieve_goal=" + goal + " WHERE achieve_type='" + type + "'"
                             );

            GameManager.Instance.ui_textbox.AsyncWrite(GameText.GetText("ACHIEVE/COMPLETE", name) + "\n" + reward_stat.ToString());
            if (count >= goal)
            {
                OnComplete();
            }
        }
        else
        {
            ProgressManager.Instance.Remove(this);
        }
    }
Beispiel #10
0
 /// <summary>
 /// Allows the game to perform any initialization it needs to before starting to run.
 /// This is where it can query for any required services and load any non-graphic
 /// related content.  Calling base.Initialize will enumerate through any components
 /// and initialize them as well.
 /// </summary>
 protected override void Initialize()
 {
     // You add your initialization logic here
     // Player
     // Create a new SpriteBatch, which can be used to draw textures.
     spriteBatch = new SpriteBatch(GraphicsDevice);
     this.Services.AddService(typeof(SpriteBatch), spriteBatch);
     // Background
     bgLayer1 = new ParallaxingBackground(this, -1, "bgLayer1");
     bgLayer2 = new ParallaxingBackground(this, -2, "bgLayer2");
     Components.Add(bgLayer1);
     Components.Add(bgLayer2);
     // Add player
     player = new Player(this, new Vector2(0, GraphicsDevice.Viewport.Height / 2));
     Components.Add(player);
     // Enemies
     enemies           = new List <Enemy>();
     previousSpawnTime = TimeSpan.Zero;
     enemySpawnTime    = TimeSpan.FromSeconds(1.0f);
     random            = new Random();
     // Explosions
     explosions = new List <Animation>();
     // Game Text
     score     = 0;
     scoreText = new GameText(this, SCORE + score, new Vector2(GraphicsDevice.Viewport.TitleSafeArea.X,
                                                               GraphicsDevice.Viewport.TitleSafeArea.Y));
     playerHealthText = new GameText(this, HEALTH + player.Health, new Vector2(GraphicsDevice.Viewport.TitleSafeArea.X,
                                                                               GraphicsDevice.Viewport.TitleSafeArea.Y + 30));
     Components.Add(scoreText);
     Components.Add(playerHealthText);
     // Enable drag gesture
     TouchPanel.EnabledGestures = GestureType.FreeDrag;
     base.Initialize();
 }
Beispiel #11
0
        public override void initialize()
        {
            var halfScreen = camera.bounds.size * 0.5f;

            var background = Background.Create("UI/deathscreen_background");

            addEntity(background);

            var restartButton = new Button("UI/restart_button_normal", "UI/restart_button_hover");

            restartButton.position = new Vector2(halfScreen.X, 580);
            restartButton.Click   += RestartButtonOnClick;
            addEntity(restartButton);

            var scoreText = new GameText($"{Player.score}");

            scoreText.position = new Vector2(halfScreen.X, 335);
            addEntity(scoreText);

            var storage = GameDataStorage.getInstance();

            storage.Load();
            var bestScoreText = new GameText($"{storage.BestScore}");

            bestScoreText.position = new Vector2(halfScreen.X, 435);
            addEntity(bestScoreText);

            var mainMenuButton = new Button("UI/menu_button_normal", "UI/menu_button_hover");

            mainMenuButton.position = new Vector2(32, 32);
            mainMenuButton.Click   += MainMenuButtonOnClick;
            addEntity(mainMenuButton);
        }
        /// <summary>
        /// Заполнить все данные
        /// </summary>
        public void GetPoints()
        {
            //Выключить все тексты
            HideMoveText();
            //Получаем доступные тексты для путешествия
            List <string> listData = ShipTypeTexts.GetActiveList(JourneyShipTypeTexts.GetTypeList());
            //Получаем количество активных текстов
            int count = listData.Count;

            //Получить несколько ближайших точек
            listPoint = JourneyManager.DB.NearestList(count);

            GameText.Initialization(listData);
            List <TextData> listUniq = GameText.GetOneType(listData);

            for (int i = 0; i < count; i++)
            {
                listText[i].gameObject.SetActive(true);
                listPoint[i].data.OnStartMove += HideMoveText;
                listPoint[i].data.ActiveName(listText[i], listUniq[i]);
            }


            for (int i = 0; i < count; i++)
            {
                listText[i].SetText(listPoint[i].data.message.GetColor(listText[i].notSelectColor));
            }
        }
Beispiel #13
0
    public void ЗаполненияСоздание()
    {
        for (int i = 0; i < слотыСоздания.transform.childCount; i++)
        {
            TownUnits tU = слотыСоздания.transform.GetChild(i).GetComponent <TownUnits>();
            tU.unit       = null;
            tU.img.sprite = null;
            tU.img.gameObject.SetActive(false);
            tU.text.text = "";
            tU.text.gameObject.SetActive(false);
            tU.interactable = false;
            слотыСозданияЮнитов.Add(tU);
        }
        List <Unit> tempUnit = new List <Unit>();

        for (int i = 0; i < GameManager.instance.units.Count; i++) //Заполнение
        {
            if (AvailableList.availableUnit[GameManager.instance.units[i].type])
            {
                tempUnit.Add(GameManager.instance.units[i]);
            }
        }
        for (int i = 0; i < tempUnit.Count; i++) //Заполнение
        {
            слотыСозданияЮнитов[i].unit       = tempUnit[i];
            слотыСозданияЮнитов[i].img.sprite = tempUnit[i].img;
            слотыСозданияЮнитов[i].img.gameObject.SetActive(true);
            слотыСозданияЮнитов[i].text.text = GameText.GetUnitName(tempUnit[i].type);
            слотыСозданияЮнитов[i].text.gameObject.SetActive(true);
            слотыСозданияЮнитов[i].interactable = true;
            слотыСозданияЮнитов[i].isCreate     = true;
        }
    }
Beispiel #14
0
    /// <summary>
    /// 获取验证码
    /// </summary>
    /// <param name="go"></param>
    private void OnToGetVerificationHandler(GameObject go)
    {
        string phoneNum = _resetNameLb.value;

        if (!IsPhoneNum(phoneNum))
        {
            UtilTools.ShowMessage(GameText.GetStr("login_name_empty"), TextColor.WHITE);
            return;
        }
        if (_bUpdateCooldwon)
        {
            UtilTools.ShowMessage(GameText.GetStr("try_later"));
            return;
        }
        _bUpdateCooldwon = true;
        if (sdk.SDKManager.isAppStoreVersion())
        {
            LoginInputController.startUpMono.PhoneVerificationCode(phoneNum, "1002", "IOS");
        }
        else
        {
            UtilTools.GetAvmpSign(phoneNum, 1002);
        }
        //
    }
Beispiel #15
0
 protected override void TestConditions()
 {
     switch (this.PlayerManager.Action)
     {
     case ActionType.Teetering:
     case ActionType.IdlePlay:
     case ActionType.IdleSleep:
     case ActionType.IdleLookAround:
     case ActionType.IdleYawn:
     case ActionType.Idle:
     case ActionType.LookingLeft:
     case ActionType.LookingRight:
     case ActionType.LookingUp:
     case ActionType.LookingDown:
     case ActionType.Walking:
     case ActionType.Running:
     case ActionType.Sliding:
     case ActionType.Landing:
         if (!this.IsOnSign() || this.InputManager.CancelTalk != FezButtonState.Pressed)
         {
             break;
         }
         this.SpeechBubble.Origin = this.PlayerManager.Position;
         this.SpeechBubble.ChangeText(GameText.GetString(this.signText));
         this.PlayerManager.Action = ActionType.ReadingSign;
         this.InputManager.PressedToDown();
         break;
     }
 }
        /// <summary>
        /// Метод, для проверки вводимого пользователем
        /// </summary>
        /// <param name="inputNumber">Число пользователя</param>
        /// <param name="NumberToWin">Заветное число</param>
        /// <param name="limit">Количество попыток юзера</param>
        /// <param name="gameText">Сюда надот текст игры впихнуть ибо будет ата-та/param>
        /// <returns>Возвращает победил ли юзер</returns>
        public bool NumberCheak(int inputNumber, int NumberToWin, int limit, GameText gameText)
        {
            for (int i = 1; i <= limit; i++)
            {
                Console.WriteLine("");
                Console.Write("-");
                try
                {
                    inputNumber = Convert.ToInt32(Console.ReadLine());
                }
                catch (Exception)
                {
                    gameText.WriteText(gameText.UserMistakeInput);
                }

                if (inputNumber > NumberToWin)
                {
                    Console.WriteLine("-Твое число больше...");
                    gameText.WriteText(gameText.UserMistake[random.Next(gameText.UserMistake.Length)]);
                }
                else if (inputNumber < NumberToWin)
                {
                    Console.WriteLine("-Твое число меньше...");
                    gameText.WriteText(gameText.UserMistake[random.Next(gameText.UserMistake.Length)]);
                }
                else
                {
                    Console.Clear();
                    return(true);
                }
            }
            return(false);
        }
Beispiel #17
0
        // Update 每帧调用一次
        override public void Update()
        {
            if (!_bStartUp)
            {
                return;
            }

            base.Update();


            int ok_step = _applicationMgr.InitOkStep;

            if (ApplicationMgr._bInitOK || ok_step == -1)//未开始初始化,或已完成
            {
                UtilTools.SetServerListTip("");
            }
            else
            {
                if (ok_step == 1)
                {
                    float  process = ConfigDataMgr.getInstance().GetConfigLoadProcess();
                    string tips    = GameText.Format("initingLoadXml", Mathf.FloorToInt(process * 100).ToString());
                    UtilTools.SetServerListTip(tips, true, process);
                }
                else if (ok_step == 4)
                {
                    //UtilTools.SetServerListTip(GameText.GetStr("loadingServerList"));
                }
                else if (ok_step == 5)
                {
                    UtilTools.SetServerListTip(GameText.GetStr("loadingNotice"), false, 1f);
                }
            }

            if (ApplicationMgr._bInitOK)
            {
                if (_startUpStep == 1)
                {
                    StartUp_step2();
                }
                else if (_startUpStep == 2 && AssetManager.IsPreLoadComplete())
                {
                    StartUp_step3();
                }
                else if (_startUpStep == 3 && GameDataMgr.LOGIN_DATA.IsConnectGamerServer)
                {
                    /*MainCityController cont = UIManager.GetControler<MainCityController>();
                     * if (cont.IsActive)
                     * {
                     *  StartUp_step4();
                     * }*/
                    StartUp_step4();
                }
                else if (_startUpStep == 4 && GameDataMgr.LOGIN_DATA.IsLoginGameServer)
                {
                    StartUp_step5();
                }
            }
        }
Beispiel #18
0
 private void Start()
 {
     coord    = FindObjects.GameLogic.GetComponent <ConvertCoordinates>();
     actor    = FindObjects.GameLogic.GetComponent <ActorBoard>();
     modeline = FindObjects.GameLogic.GetComponent <UIModeline>();
     terrain  = FindObjects.GameLogic.GetComponent <DungeonTerrain>();
     text     = FindObjects.GameLogic.GetComponent <GameText>();
 }
Beispiel #19
0
 private void Start()
 {
     coord   = FindObjects.GameLogic.GetComponent <ConvertCoordinates>();
     message = FindObjects.GameLogic.GetComponent <UIMessage>();
     text    = FindObjects.GameLogic.GetComponent <GameText>();
     color   = FindObjects.GameLogic.GetComponent <GameColor>();
     data    = FindObjects.GameLogic.GetComponent <InfectionData>();
 }
Beispiel #20
0
 void Start()
 {
     script = GameObject.Find("Text").GetComponent <GameText>();
     player = GameObject.Find("Player");
     wallet = GameObject.Find("Wallet");
     player.GetComponent <Player> ().flipMove();
     player.GetComponent <Player> ().flipInvestigate();
 }
Beispiel #21
0
        public override void Update(GameTime gameTime)
        {
            mouseRec = new Rectangle(mouse.X, mouse.Y, 5, 5);
            if (endFirstClic && mouse.LeftButton == ButtonState.Pressed)
            {
                if (oldMouse.LeftButton == ButtonState.Released)
                {
                    if (mouseRec.Intersects(boutonPleinEcran))
                    {
                        isFullscreen = !isFullscreen;
                        Game1.graphics.ToggleFullScreen();
                    }
                    else if (mouseRec.Intersects(boutonLangue))
                    {
                        _currentLanguage++;

                        if (_currentLanguage > Language.Français)
                        {
                            _currentLanguage = 0;
                        }

                        if (_currentLanguage == Language.Français)
                        {
                            GameText.langue = "french";
                        }
                        else if (_currentLanguage == Language.English)
                        {
                            GameText.langue = "english";
                        }
                        GameText.initGameText();
                    }
                    else if (mouseRec.Intersects(boutonRetour))
                    {
                        if (isPauseOption)
                        {
                            SceneHandler.gameState = GameState.Pause;
                        }
                        else
                        {
                            SceneHandler.gameState = GameState.MainMenu;
                        }
                        endFirstClic = false;
                    }
                }
            }
            else if (!endFirstClic && mouse.LeftButton == ButtonState.Released)
            {
                endFirstClic = true;
            }

            if (isPauseOption && keyboardState.IsKeyDown(Keys.Escape))
            {
                SceneHandler.gameState = GameState.Editor;
            }
            fullscreenText          = (isFullscreen ? noT.get() : yesT.get());
            positionTexteFullscreen = new Vector2(boutonPleinEcran.Left - spriteFont.MeasureString(pleinEcranT.get() + " :").X, boutonPleinEcran.Center.Y - spriteFont.MeasureString(pleinEcranT.get() + " :").Y / 2);
            positionTexteLangue     = new Vector2(boutonLangue.Left - spriteFont.MeasureString(langueT.get() + " :").X, boutonLangue.Center.Y - spriteFont.MeasureString(langueT.get() + " :").Y / 2);
        }
Beispiel #22
0
 }    // = null;
 //private static string file;// = null;
 //string _path;
 static GameText()    // : base(path)
 {
     //should return english if player's default language is null
     //if(path == null)_initialize();
     //base.Initialize(file ?? "PokemonUnity");
     //Instance.Initialize(file ?? "PokemonUnity");
     //instanceHolder.Initialize(file ?? "PokemonUnity");
     instanceHolder = new GameText(filename: null);
 }
Beispiel #23
0
 public void ВыборЮнитаДляСоздания(TownUnits townUnit)
 {
     создающийся          = townUnit.unit;
     картинкаЮнита.sprite = townUnit.unit.img2;
     картинкаЮнита.gameObject.SetActive(true);
     имя.text                  = GameText.GetUnitName(townUnit.unit.type);
     описание.text             = GameText.GetUnitDescription(townUnit.unit.type);
     создатьЮнита.interactable = true;
 }
 private void Start()
 {
     _gameText         = GetComponent <GameText>();
     _levelController  = FindObjectOfType <LevelController>();
     _endOfGameControl = FindObjectOfType <EndOfGameControl>();
     Time.timeScale    = 1.0F;
     _endOfGameControl.MainCamera.gameObject.SetActive(true);
     _endOfGameControl.EndOfGameParts.SetActive(false);
 }
Beispiel #25
0
 private void Start()
 {
     mode     = FindObjects.GameLogic.GetComponent <SubMode>();
     buyPower = FindObjects.GameLogic.GetComponent <UIBuyPower>();
     ui       = FindObjects.GameLogic.GetComponent <UserInterface>();
     pcPower  = FindObjects.PC.GetComponent <Power>();
     header   = FindObjects.GameLogic.GetComponent <HeaderAction>();
     text     = FindObjects.GameLogic.GetComponent <GameText>();
 }
    public override void PhaseStart()
    {
        base.PhaseStart();
        GameText.Initialization(new List <string>(new string[] { "TransitionMetal_ENG" }));


        JourneyPhase.PhaseGame?.Invoke();
        Debug.Log("PhaseStart");
    }
Beispiel #27
0
 private void Start()
 {
     board    = FindObjects.GameLogic.GetComponent <DungeonBoard>();
     terrain  = FindObjects.GameLogic.GetComponent <DungeonTerrain>();
     modeline = FindObjects.GameLogic.GetComponent <UIModeline>();
     coord    = FindObjects.GameLogic.GetComponent <ConvertCoordinates>();
     setting  = FindObjects.GameLogic.GetComponent <GameSetting>();
     text     = FindObjects.GameLogic.GetComponent <GameText>();
 }
Beispiel #28
0
 protected override void LoadContent()
 {
     this.sLetterAppear            = this.CMProvider.CurrentLevel.Load <SoundEffect>("Sounds/MiscActors/LetterAppear");
     this.letterTexture            = this.CMProvider.CurrentLevel.Load <Texture2D>("Other Textures/mail/" + this.LetterName + "_1");
     this.textRenderer             = new GlyphTextRenderer(this.Game);
     this.sb                       = new SpriteBatch(this.GraphicsDevice);
     this.PlayerManager.CanControl = false;
     this.PlayerManager.Action     = ActionType.ReadTurnAround;
     this.LetterText               = GameText.GetString(this.LetterName);
 }
Beispiel #29
0
 public void print(string message)
 {
     temp = (GameText)Instantiate(listing);
     temp.transform.SetParent(gameObject.transform);
     temp.transform.localScale = test;
     temp.source = this;
     temp.setMessage(message);
     temp.gameObject.SetActive(true);
     count++;
 }
Beispiel #30
0
 public GameManager()
 {
     snakeArray[0] = new Snake(300f, 300f, 10f, 10f, true, true);
     for (int counter = 1; counter < snakeArray.Length; counter++)
     {
         snakeArray[counter] = new Snake(300f, 300f, 10f, 10f, false, false);
     }
     food     = new Food(10f, 10f, SimpleWindow.WINDOW);
     gameText = new GameText(_score.ToString());
 }
        /// <summary>
        /// Get text in game that ongoing by gameID.
        /// </summary>
        /// <param name="gameID">GameID.</param>
        /// <returns>All text in game.</returns>
        public IEnumerable<GameText> GetAllGameTextsByGameID(int gameID)
        {
            var query = default(IEnumerable<GameText>);

            var queryFirst = from gi in npb.GameInfoGTE
                    join txti in npb.TextInfoGTE on gi.GameInfoGTEId equals txti.GameInfoGTEId
                    join bat in npb.BatGTE on txti.TextInfoGTEId equals bat.TextInfoGTEId
                    join tigte in npb.TextGTE on bat.BatGTEId equals tigte.BatGTEId
                    where gi.GameID == gameID && txti.ID != 0
                    select new GameText
                    {
                        GameInfoGTEID = gi.GameInfoGTEId,
                        Round = txti.ID.ToString().Substring(0, 1),
                        RoundName = (txti.Name == null ? string.Empty : txti.Name),
                        TextOfTeam = (tigte.Text == null ? string.Empty : tigte.Text),
                        ID = txti.ID,

                    };

            //Get last digit of ID.
            List<GameText> newList = new List<GameText>();
            foreach (var item in queryFirst.ToList())
            {
                GameText gText = new GameText();
                gText = item;
                gText.ID = Convert.ToInt32(item.ID.ToString().Substring(item.ID.ToString().Length - 1, 1));
                newList.Add(gText);
            }

            query = from q1 in newList
                    join ti in npb.TeamInfoGTE on q1.GameInfoGTEID equals ti.GameInfoGTEId
                    where ti.HV != q1.ID
                    select new GameText
                    {
                        GameInfoGTEID = q1.GameInfoGTEID,
                        Round = q1.Round,
                        RoundName = q1.RoundName,
                        TeamID = ti.ID,
                        TeamNameS = ti.NameS,
                        TextOfTeam = q1.TextOfTeam,
                        ID = q1.ID,
                    };
            return query;
        }
Beispiel #32
0
 // Use this for initialization
 void Start()
 {
     instance = this;
     Init ();
 }