Exemple #1
0
    // Use this for initialization
    void Awake()
    {
        if (GameSettings.SOLO)
        {
            objTimer.SetActive(false);
        }

        scrTimer = objTimer.GetComponent <TimerUI>();

        if (GameInfoChoose.currentRoundTimeLeft != 0)
        {
            timeToNextGame = GameInfoChoose.currentRoundTimeLeft;
            GameInfoChoose.currentRoundTimeLeft = 0;
        }
        else
        {
            timeToNextGame = GameInfoChoose.info.round_duration_ms;
        }

        GameInfoChoose.SetNewRound();

        scrPrWPre = previewWordObj.GetComponent <PreviewWordPrefab>();

        whatSortText = whatSortObj.GetComponent <Text>();
    }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        currentScore    = GameObject.Find("CurrentScore").GetComponent <CurrentScore>();
        fullScore       = GameObject.FindObjectOfType <FullScore>();
        score           = GetComponent <Score>();
        energy          = GetComponent <Energy>();
        energyLine      = GameObject.FindObjectOfType <EnergyLine>();
        inputController = GameObject.FindObjectOfType <InputController>();
        timerScript     = GameObject.FindObjectOfType <TimerScript>();
        timerUI         = GameObject.FindObjectOfType <TimerUI>();
        info            = GetComponent <Info>();
        taskStrings     = GetComponent <TaskStrings>();
        pauseButton     = GameObject.FindObjectOfType <PauseButton>().gameObject;
        pauseMenu       = GameObject.Find("Canvas").GetComponentInChildren <PauseMenu>();
        //  endMenu = GameObject.FindObjectOfType<EndMenu>();
        taskHelper       = GameObject.FindObjectOfType <TaskHelper>();
        globalController = GetComponent <GlobalController>();
        cam            = GameObject.Find("MainCamera");
        secondCamera   = GameObject.Find("SecondCamera");
        wordRideCanvas = GameObject.FindObjectOfType <WordRideCanvas>();

        metalSparksPrefab = Resources.Load("Prefabs/Particles/MetalSpark") as GameObject;
        carUserParametres = GetComponent <CarUserParametres>();
        gameUI            = GameObject.FindObjectOfType <GameUI>();
        canvasController  = GameObject.FindObjectOfType <CanvasController>();

        particleCanvas = GameObject.Find("ParticleCanvas");
        carCreator     = GameObject.FindObjectOfType <CarCreator>();

        mainBonus = GameObject.FindObjectOfType <MainBonus>();

        waitBackground = GameObject.FindObjectOfType <WaitBackground>();
    }
        public void Initialize()
        {
            isEndFlag = false;
            random    = new Random();
            var player = new Player(this);

            characterManager = new CharacterManager();
            characterManager.Add(player);
            //エネミーの追加
            for (int i = 0; i < 5; i++)
            {
                var position = new Vector2(0, 0);
                position.X = random.Next((int)(player.position.X + 30f), 30500);
                position.Y = random.Next(450, 550);
                characterManager.Add(new Enemy(position, random.Next(1, 10), this));
            }
            //アイテムの追加
            for (int i = 0; i < 7; i++)
            {
                var position = new Vector2(0, 0);
                position.X = random.Next((int)(player.position.X + 30f), 30500);
                position.Y = random.Next(450, 550);
                characterManager.Add(new Item(position, random.Next(5, 13), this));
            }

            timer   = new CountUpTimer(0);
            timerUI = new TimerUI(timer);

            Camera_2D.Initialize();
        }
Exemple #4
0
    void Awake()
    {
        if (GameSettings.SOLO)
        {
            objTimer.SetActive(false);
        }

        scrTimer = objTimer.GetComponent <TimerUI>();

        scrPrWPreTop = previewWordObjTop.GetComponent <PreviewWordPrefab>();
        scrPrWPreBot = previewWordObjBot.GetComponent <PreviewWordPrefab>();

        txtWordsShown    = new Text[2];
        btnScript        = new DragUIElement[2];
        btnText          = new Text[2];
        txtWordsShown[0] = shownWordsObject1.GetComponentInChildren <Text>();
        txtWordsShown[1] = shownWordsObject2.GetComponentInChildren <Text>();

        txtWordsShownScore    = new Text[2];
        txtWordsShownScore[0] = shownWordScoreObj[0].GetComponent <Text>();
        txtWordsShownScore[1] = shownWordScoreObj[1].GetComponent <Text>();

        sendScore = objSendScore.GetComponent <SendScore>();

        btnText[0] = btnObject1.GetComponentInChildren <Text>();
        btnText[1] = btnObject2.GetComponentInChildren <Text>();

        btnScript[0] = btnObject1.GetComponent <DragUIElement>();
        btnScript[1] = btnObject2.GetComponent <DragUIElement>();

        userWordsChoices = new List <DragWords>();
        userChoicesGroup = new List <int>();
    }
    // Use this for initialization
    void Awake()
    {
        objTimer.SetActive(false);

        scrTimer = objTimer.GetComponent <TimerUI>();

        GameInfoChoose.tempList = GameInfoChoose.chosenButtons;

        classyText = new Text[3];
        classyBtn  = new Button[3];
        classyImg  = new Image[3];

        choiceText = new Text[3];
        choiceBtn  = new Button[3];
        choiceImg  = new Image[3];
        for (int i = 0; i < 3; i++)
        {
            classyText[i] = classyObj[i].GetComponentInChildren <Text>();
            classyBtn[i]  = classyObj[i].GetComponent <Button>();
            classyImg[i]  = classyObj[i].GetComponent <Image>();

            choiceText[i] = choiceObj[i].GetComponentInChildren <Text>();
            choiceBtn[i]  = choiceObj[i].GetComponent <Button>();
            choiceImg[i]  = choiceObj[i].GetComponent <Image>();
        }

        classyfiedBtns = new List <ChooseButtons>();

        reorder        = false;
        reorderNumbers = new List <int>();

        setUpChosenWords();
    }
Exemple #6
0
    void Awake()
    {
        objTimer.SetActive(false);

        scrTimer = objTimer.GetComponent <TimerUI>();

        scrPrWPreTop = previewWordObjTop.GetComponent <PreviewWordPrefab>();
        scrPrWPreBot = previewWordObjBot.GetComponent <PreviewWordPrefab>();

        txtWordsShown    = new Text[2];
        btnScript        = new DragUIElementCol[2];
        btnText          = new Text[2];
        txtWordsShown[0] = shownWordsObject1.GetComponentInChildren <Text>();
        txtWordsShown[1] = shownWordsObject2.GetComponentInChildren <Text>();

        txtWordsShownScore    = new Text[2];
        txtWordsShownScore[0] = shownWordScoreObj[0].GetComponent <Text>();
        txtWordsShownScore[1] = shownWordScoreObj[1].GetComponent <Text>();

        sendScore = objSendScore.GetComponent <SendScore>();

        btnText[0] = btnObject1.GetComponentInChildren <Text>();
        btnText[1] = btnObject2.GetComponentInChildren <Text>();

        btnScript[0] = btnObject1.GetComponent <DragUIElementCol>();
        btnScript[1] = btnObject2.GetComponent <DragUIElementCol>();

        userWordsChoices = new List <DragWords>();
        userChoicesGroup = new List <int>();

        structureTextObj.SetActive(true);
        structureTextObj.GetComponent <Text>().text = GameInfoDrag.info.words[GameInfoDrag.currentRound].structure_text;
    }
 void Start()
 {
     playerHazardHandler = FindObjectOfType <PlayerHazardHandler>();
     timerUI             = FindObjectOfType <TimerUI>();
     timeBodies          = FindObjectsOfType <TimeBody>();
     playerMovement      = FindObjectOfType <PlayerMovement>();
 }
Exemple #8
0
        /// <summary>
        /// 初期化処理(起動時、コンストラクタの後に1度だけ呼ばれる)
        /// </summary>
        protected override void Initialize()
        {
            // この下にロジックを記述
            player = new Player();

            player.Initialize();
            //コインの実体生成
            coin = new Coin();
            //コインを初期化
            coin.Initialize();

            timer      = new CountDowntimer(10);
            timerUI    = new TimerUI(timer);
            waittimer  = new CountDowntimer(2);
            characters = new List <Character>();
            characters.Add(new Coin());
            for (int i = 0; i < 1; i++)
            {
                characters.Add(new Coin());
            }
            foreach (var c in characters)
            {
                c.Initialize();
            }



            // この上にロジックを記述
            base.Initialize();// 親クラスの初期化処理呼び出し。絶対に消すな!!
        }
Exemple #9
0
    // Use this for initialization
    void Awake()
    {
        if (GameSettings.SOLO)
        {
            objTimer.SetActive(false);
        }

        scrTimer = objTimer.GetComponent <TimerUI>();

        GameInfoDrag.SetNewRound();

        scrPrWPreTop = previewWordObjTop.GetComponent <PreviewWordPrefab>();
        scrPrWPreBot = previewWordObjBot.GetComponent <PreviewWordPrefab>();

        whatSortText1 = whatSortObj1.GetComponent <Text>();
        whatSortText2 = whatSortObj2.GetComponent <Text>();

        if (GameInfoDrag.currentRoundTimeLeft != 0)
        {
            timeToNextGame = (long)GameInfoDrag.currentRoundTimeLeft;
            GameInfoDrag.currentRoundTimeLeft = 0;
        }
        else
        {
            timeToNextGame = GameInfoDrag.info.round_duration_ms;
        }
    }
Exemple #10
0
    // Use this for initialization
    void Start()
    {
        currentScore = GameObject.Find("CurrentScore").GetComponent<CurrentScore>();
        fullScore = GameObject.FindObjectOfType<FullScore>();
        score = GetComponent<Score>();
        energy = GetComponent<Energy>();
        energyLine = GameObject.FindObjectOfType<EnergyLine>();
        inputController = GameObject.FindObjectOfType<InputController>();
        timerScript = GameObject.FindObjectOfType<TimerScript>();
        timerUI = GameObject.FindObjectOfType<TimerUI>();
        info = GetComponent<Info>();
        taskStrings = GetComponent<TaskStrings>();
        pauseButton = GameObject.FindObjectOfType<PauseButton>().gameObject;
        pauseMenu = GameObject.Find("Canvas").GetComponentInChildren<PauseMenu>();
          //  endMenu = GameObject.FindObjectOfType<EndMenu>();
        taskHelper = GameObject.FindObjectOfType<TaskHelper>();
        globalController = GetComponent<GlobalController>();
        cam = GameObject.Find("MainCamera");
        secondCamera = GameObject.Find("SecondCamera");
        wordRideCanvas = GameObject.FindObjectOfType<WordRideCanvas>();

        metalSparksPrefab = Resources.Load("Prefabs/Particles/MetalSpark") as GameObject;
        carUserParametres = GetComponent<CarUserParametres>();
        gameUI = GameObject.FindObjectOfType<GameUI>();
        canvasController = GameObject.FindObjectOfType<CanvasController>();

        particleCanvas = GameObject.Find("ParticleCanvas");
        carCreator = GameObject.FindObjectOfType<CarCreator>();

        mainBonus = GameObject.FindObjectOfType<MainBonus>();

        waitBackground = GameObject.FindObjectOfType<WaitBackground>();
    }
Exemple #11
0
 public override void Hide(UIScene.SceneVoidDelegate afterFinished = null)
 {
     UIScene.SceneVoidDelegate sceneVoidDelegate = delegate
     {
         SceneDirector.FF9Wipe_FadeInEx(256);
         battle.ff9ShutdownStateBattleResult();
         this.ItemListPanel.SetActive(false);
         PersistenSingleton <FF9StateSystem> .Instance.mode = PersistenSingleton <FF9StateSystem> .Instance.prevMode;
         Byte mode = PersistenSingleton <FF9StateSystem> .Instance.mode;
         if (mode == 3)
         {
             SceneDirector.Replace("WorldMap", SceneTransition.FadeOutToBlack, true);
         }
         else if (mode == 5 || mode == 1)
         {
             SceneDirector.Replace("FieldMap", SceneTransition.FadeOutToBlack, true);
         }
         if (this.isTimerDisplay && TimerUI.Enable)
         {
             TimerUI.SetDisplay(true);
         }
     };
     if (afterFinished != null)
     {
         sceneVoidDelegate = (UIScene.SceneVoidDelegate)Delegate.Combine(sceneVoidDelegate, afterFinished);
     }
     base.Hide(sceneVoidDelegate);
     SceneDirector.FF9Wipe_FadeInEx(12);
     this.screenFadePanel.depth = 5;
 }
Exemple #12
0
        public void NotifyEndCountdown()
        {
            this.player.isPlay = true;
            //uiCanvasのTimerを取得してタイマーをスタートする。
            TimerUI timerUi = uiCanvas.GetComponentInChildren <TimerUI>();

            timerUi.NotifyEndCountdown();
        }
 void Pause()
 {
     pauseMenuUI.SetActive(true);
     TimerUI.SetActive(false);
     DecountUI.SetActive(false);
     Time.timeScale = 0f;
     GameIsPaused   = true;
     GameSettings   = false;
 }
    public void SwitchState(Material mat, TimerUI newTimer)
    {
        Debug.Log("SwitchMat");
        gameObject.GetComponent <Renderer>().material = mat;

        Debug.Log("switched material");
        Debug.Log("Rando string: " + newTimer.randoString);
        newTimer.ToggleHelper(true);
    }
Exemple #15
0
 void Pause()
 {
     pauseMenuUI.SetActive(true);
     TimerUI.SetActive(false);
     WaitingPlayersUI.SetActive(false);
     DecountUI.SetActive(false);
     Time.timeScale = 1f; // Changer la valeur pour le solo
     GameIsPaused   = true;
     GameSettings   = false;
 }
    // Use this for initialization
    void Awake()
    {
        scrTimer = objTimer.GetComponent <TimerUI>();

        scrollRectScorboard = objScrollViewTxtScoreboard.GetComponent <ScrollRect>();
        contentTrans        = contentObj.GetComponent <RectTransform>();

        thisPlayerObj.SetActive(false);

        leaderboard = (LoadLeaderboard)GameObject.FindObjectOfType(typeof(LoadLeaderboard));
    }
Exemple #17
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(this.gameObject);
     }
 }
Exemple #18
0
 private void LateUpdate()
 {
     if (this._skipMenuScene && !this._isChangingScene)
     {
         this._isChangingScene = true;
         TimerUI.SetEnable(false);
         ExpansionVerifier.printLog("GUIManager : goto Title");
         SceneDirector.Replace("Title", SceneTransition.FadeOutToBlack_FadeIn, true);
         SceneDirector.ToggleFadeAll(false);
     }
 }
	// Use this for initialization
	void Start () {
        timeleft = updateInterval;  
        
        sceneFader = GameObject.FindGameObjectWithTag("GameController").GetComponent<SceneFader>();
        healthController = GameObject.FindGameObjectWithTag("Player").GetComponent<HealthController>();

        ui_timerText = GameObject.Find("UI_Canvas/UI_TimerText").GetComponent<TimerUI>();
        ui_levelInfo = GameObject.Find("UI_Canvas/UI_LevelInfoText").GetComponent<LevelInfoUI>();
        
        ui_healthPoints = GameObject.Find("UI_Canvas/UI_HealthPoints").GetComponent<HealthPointsUI>();
        ui_debug = GameObject.Find("UI_Canvas/UI_Debug").GetComponent<DebugUI>();
	}
    // Use this for initialization
    void Awake()
    {
        if (GameSettings.SOLO)
        {
            objTimer.SetActive(false);
            soloButtonObj.SetActive(true);
        }

        scrTimerHelper = objTimerHelper.GetComponent <TimerUI>();

        scrTimer = objTimer.GetComponent <TimerUI>();
        GameSettings.CURRENTLY_RUNNING_GAME_MODE = GameSettings.GAME_MODE_SYNONYM;
    }
Exemple #21
0
 void Start()
 {
     this.tui = this.GetComponentInChildren <TimerUI>();
     this.ad  = this.GetComponentInChildren <ActionDisplay>();
     this.lb  = this.GetComponentInChildren <LockButton>();
     this.dbp = this.GetComponentInChildren <DebugPanel>();
     this.gsd = this.GetComponentInChildren <GameStateDisplay>();
     this.asg = this.GetComponentInChildren <ActionSelectGroup>();
     this.god = this.GetComponentInChildren <GameOverDisplay>();
     this.GameOverDisplayHide();         // Hide this till needed. Todo Warning, may depend on script execution order
     this.lasb = new List <ActionSelectButton>();
     this.hsd  = this.GetComponentInChildren <HitSunkDisplay>();
 }
Exemple #22
0
    // Use this for initialization
    void Awake()
    {
        objTimer.SetActive(false);

        scrTimer = objTimer.GetComponent <TimerUI>();

        choice1Text = choice1Obj.GetComponentInChildren <Text>();
        choice2Text = choice2Obj.GetComponentInChildren <Text>();
        choice3Text = choice3Obj.GetComponentInChildren <Text>();

        additionalInfoText = additionalInfoObj.GetComponent <Text>();

        setPreviewWords();
    }
    // Use this for initialization
    void Awake()
    {
        if (GameSettings.SOLO)
        {
            objTimer.SetActive(false);
            soloButtonObj.SetActive(true);
        }

        scrTimer = objTimer.GetComponent <TimerUI>();

        scrGetScoreboard = objGetScoreboard.GetComponent <GetScoreboard>();

        called = false;
    }
    // Use this for initialization
    void Awake()
    {
        if (GameSettings.SOLO)
        {
            objTimer.SetActive(false);
            soloButtonObj.SetActive(true);
            soloButtonText = soloButtonObj.GetComponentInChildren <Text>();

            /*soloButtonText.text = TEXT_NEXT;
             * if (GameInfoChoose.currentRound == (GameInfoChoose.info.number_of_rounds - 1))
             * {
             *  soloButtonText.text = TEXT_END;
             * }*/
        }

        scrTimer = objTimer.GetComponent <TimerUI>();

        starsScripts = new StarsPrefab[starsObj.Length];
        for (int i = 0; i < starsObj.Length; i++)
        {
            starsScripts[i] = starsObj[i].GetComponent <StarsPrefab>();
        }

        sumPointsText       = sumPointsObj.GetComponent <Text>();
        rightOrderScoreText = rightOrderScoreObj.GetComponent <Text>();
        rightOrderText      = rightOrderTextObj.GetComponent <Text>();

        chosenWordsText      = new Text[3];
        chosenWordsScoreText = new Text[3];
        for (int i = 0; i < 3; i++)
        {
            chosenWordsText[i]      = chosenWordsObj[i].GetComponent <Text>();
            chosenWordsScoreText[i] = chosenWordsScoreObj[i].GetComponent <Text>();

            chosenWordsText[i].text      = "";
            chosenWordsScoreText[i].text = "";
        }

        scrSendScore = objSendScore.GetComponent <SendScore>();

        scrGetScoreboard = objGetScoreboard.GetComponent <GetScoreboard>();

        scrConnect = objConnect.GetComponent <Connect>();

        saveRound = GameInfoChoose.currentRound;
        maxRounds = GameInfoChoose.info.number_of_rounds;

        canvasObj.SetActive(false);
        objProgressCircle.SetActive(true);
    }
Exemple #25
0
    void Awake()
    {
        if (GameSettings.SOLO)
        {
            objTimer.SetActive(false);
            soloButtonObj.SetActive(true);
        }

        scrTimer = objTimer.GetComponent <TimerUI>();

        previewWord    = GameInfoInsert.info.words[GameInfoInsert.currentRound].word;
        previewWordPos = GameInfoInsert.info.words[GameInfoInsert.currentRound].position;

        scrSendScore = objSendScore.GetComponent <SendScore>();
    }
Exemple #26
0
    private void Awake()
    {
        m_Canvases   = GetComponentsInChildren <Canvas>(true);
        m_Raycasters = GetComponentsInChildren <GraphicRaycaster>(true);

        for (int i = 0; i < m_Canvases.Length; i++)
        {
            m_TimerUI = m_Canvases[i].GetComponent <TimerUI>();

            if (m_TimerUI != null)
            {
                break;
            }
        }
    }
 public void Resume()
 {
     pauseMenuUI.SetActive(false);
     Time.timeScale = 1f;
     GameIsPaused   = false;
     GameSettings   = false;
     if (WaitingTimeSolo.DecountDis)
     {
         DecountUI.SetActive(true);
     }
     else if (WaitingTimeSolo.TimerDis)
     {
         TimerUI.SetActive(true);
     }
 }
    void Awake()
    {
        objTimer.SetActive(false);
        soloButtonObj.SetActive(true);

        scrTimer = objTimer.GetComponent <TimerUI>();

        previewWord    = GameInfoInsert.info.words[0].word;
        previewWordPos = GameInfoInsert.info.words[0].position;

        scrSendScore = objSendScore.GetComponent <SendScore>();

        structureTextObj.SetActive(true);
        structureTextObj.GetComponent <Text>().text = GameInfoInsert.info.words[GameInfoInsert.currentRound].structure_text;
    }
 private void ButtonControl_Clicked(Object src, EventArgs evt)
 {
     if (TimerUI.Enabled)
     {
         TimerUI.Stop();
         ButtonControl.Text      = "Start!";
         ButtonControl.BackColor = Color.Green;
     }
     else
     {
         TimerUI.Start();
         ButtonControl.Text      = "Stop!";
         ButtonControl.BackColor = Color.Red;
     }
 }
 // Use this for initialization
 void Start()
 {
     survivalTime  = Random.Range(minSurvivalTime, maxSurvivalTime);
     survivalTimer = survivalTime;
     timerUI       = GameObject.Find("Timer").GetComponent <TimerUI>();
     if (timerUI != null)
     {
         timerUI.SetTimer(survivalTime);
     }
     if (AudioManager.instance)
     {
         AudioManager.instance.PlaySound("Music");
     }
     levelStatus = LevelStatus.IN_PROGRESS;
 }
Exemple #31
0
    private void InitialEvent()
    {
        this.currentState = BattleResultUI.ResultState.None;
        FF9StateBattleMap map = FF9StateSystem.Battle.FF9Battle.map;

        if (map.evtPtr != null)
        {
            this.AllPanel.SetActive(false);
            PersistenSingleton <EventEngine> .Instance.StartEvents(map.evtPtr);

            if (this.isTimerDisplay && TimerUI.Enable)
            {
                TimerUI.SetDisplay(false);
            }
        }
    }
Exemple #32
0
 public override void Show(UIScene.SceneVoidDelegate afterFinished = null)
 {
     SceneDirector.FF9Wipe_FadeInEx(30);
     UIScene.SceneVoidDelegate sceneVoidDelegate = delegate
     {
         SceneDirector.FF9Wipe_FadeInEx(24);
         this.AnimatePanel(1);
     };
     TimerUI.SetEnable(false);
     if (afterFinished != null)
     {
         sceneVoidDelegate = (UIScene.SceneVoidDelegate)Delegate.Combine(sceneVoidDelegate, afterFinished);
     }
     base.Show(sceneVoidDelegate);
     PersistenSingleton <UIManager> .Instance.SetGameCameraEnable(false);
 }