// Use this for initialization
 void Start()
 {
     //時間表示テキスト取得
     timeText = timeTextObj.GetComponent <Text>();
     //カウントダウンクラス取得
     countDownController = GameObject.Find("CountDownUI").GetComponent <CountDownController>();
 }
Exemple #2
0
 // Use this for initialization
 void Start()
 {
     //コンボ数初期化
     ComboInit();
     //カウントダウンクラス取得
     countDownController = GameObject.Find("CountDownUI").GetComponent <CountDownController>();
 }
Exemple #3
0
 // Start is called before the first frame update
 void Start()
 {
     ARCamera            = myArController.ARCamera;
     countdownController = countDownPanel.GetComponent <CountDownController>();
     myState             = State.Scaning;
     showPanelwithAnim(instructionPanel, popupClip);
     instructionText.text = scanInstruction;
     setProperty("ready", false);
 }
Exemple #4
0
        public void ReturnedBatteriesExistsCase1002Test()
        {
            BaseController.SelectedBettery = null;

            bool expected = false;
            bool actual   = CountDownController.ReturnedBatteriesExists();

            Assert.AreEqual(expected, actual);
        }
Exemple #5
0
    /// <summary>
    /// When server established successfully, server automatically starts the countdown.
    /// </summary>
    public override void OnStartServer()
    {
        Debug.Log("Countdown Starts, Now!");
        //instantiate prefab on server / host
        GameObject countDownTimer = Instantiate(countDownPrefab);

        countdownController_I = countDownTimer.GetComponent <CountDownController>();
        //this causes to instantiate the same object on the connected clients
        NetworkServer.Spawn(countDownTimer);

        StartCoroutine(CountdownRoutine());
    }
Exemple #6
0
    // Use this for initialization
    void Start()
    {
        //クラス取得
        enemyDeath = GetComponent <EnemyDeath>();
        //オーディオソース取得
        audioSource = GetComponent <AudioSource>();
        //ターゲット検索
        targetObject = GameObject.FindGameObjectWithTag("MainCamera");

        //カウントダウンクラス取得
        countDownController = GameObject.Find("CountDownUI").GetComponent <CountDownController>();
    }
Exemple #7
0
        public void ReturnedBatteriesExistsCase1001Test()
        {
            BaseController.SelectedBettery = new BetteryVend
            {
                AaReturn = 1
            };

            bool expected = true;
            bool actual   = CountDownController.ReturnedBatteriesExists();

            Assert.AreEqual(expected, actual);
        }
    // Use this for initialization
    void Start()
    {
        //スポーン時間設定
        spawnTime = Random.Range(minTimeRange, maxTimeRange);

        //オフラインなら
        if (!IsNetwork.isOnline)
        {
            //カウントダウンクラス取得
            countDownController = GameObject.Find("CountDownUI").GetComponent <CountDownController>();
        }
    }
Exemple #9
0
 // Use this for initialization
 void Start()
 {
     //スコア表示テキスト取得
     scoreText = scoreTextObj.GetComponent <Text>();
     //スコア初期化
     score = 0;
     //スコア倍率初期化
     scoreMagni = 1;
     //スコア倍率表示テキスト取得
     magniText = magniTextObj.GetComponent <Text>();
     //ランキングがなければ初期化
     if (!PlayerPrefs.HasKey("Ranking"))
     {
         PlayerPrefs.SetString("Ranking", "0,0,0,0,0,0,0,0,0,0");
     }
     //カウントダウンクラス取得
     countDownController = GameObject.Find("CountDownUI").GetComponent <CountDownController>();
 }
Exemple #10
0
        /// <summary>
        /// Starts the count down.
        /// </summary>
        private void StartCountDown()
        {
            _currentControlFocus = BaseController.CurrentControlFocus;

            CurrentPopupTimeOut = PopupTimeOut;
            if (CountDownController.ReturnedBatteriesExists())
            {
                UpdateMessage(Constants.Messages.ReturnBatteriesMessage);
            }
            else
            {
                UpdateMessage(Constants.Messages.DefaultMessage);
            }

            UIHelper.DispatchThread(this, main => main.Visibility = Visibility.Visible);
            UpdateTime(CurrentPopupTimeOut);

            _timerCountDown.Start();
            _timer.Stop();
        }
    private void Start()
    {
        dayNightController.GetActualTime += SetTimeJson;
        LoadData();

        dayNightController.StartTime(timeJSON);

        Instantiate(Interface);


        countdownController             = GameObject.FindWithTag("CountDown").GetComponent <CountDownController>();
        countdownController.secondsLeft = totalSecondsGame;
        countdownController.StartCountDown();
        countdownController.OnCountdownOver += OnCountDownDone;

        if (OnGameStart != null)
        {
            OnGameStart();
        }
    }
Exemple #12
0
    void Start()
    {
        // if (connector == null){
        //  connector = GameObject.Find("ConnectorManager").GetComponent<ConnectorManager>();
        // }
        instance = this;
        GameObject g = GameObject.Find("ConnectorManager");

        if (g == null)
        {
            connector.gameObject.SetActive(true);
            soundManager.gameObject.SetActive(true);
            GameObject.DontDestroyOnLoad(connector.gameObject);
            GameObject.DontDestroyOnLoad(soundManager.gameObject);
            isOnLocalTest = true;
        }
        else
        {
            connector    = g.GetComponent <ConnectorManager>();
            soundManager = GameObject.Find("SoundManager").GetComponent <SoundManager>();
        }
        connector.gameController = this;
        soundManager.PlayBGM("062");
        if (uiController == null)
        {
            uiController = GameObject.Find("UIController").GetComponent <UIController>();
            uiController.SetLoadingScreen(true);
        }
        try {
            playerIdCache = null;
            if (foreController == null)
            {
                Debug.Log("Finding bg: " + GameObject.Find("Foreground"));
                foreController = GameObject.Find("Foreground").GetComponent <ForegroundController>();
            }
            if (backgroundSprite == null)
            {
                Debug.Log("Finding bg: " + GameObject.Find("Background"));
                backgroundSprite = GameObject.Find("Background").GetComponent <SpriteRenderer>();
            }
            // no ExplosionController assigned
            if (explosionController == null)
            {
                try{
                    explosionController = GameObject.Find("ExplosionController").GetComponent <ExplosionController>();
                }
                catch (Exception e) {
                    Debug.Log("No explosionController : " + e.ToString());
                }
            }
            if (mainCamController == null)
            {
                mainCamController = GameObject.Find("MainCamera").GetComponent <CameraController>();
                mainCamController.UpdateClamp(foreController.bottomLeftPosition, foreController.topRightPosition);
            }
            if (minimapCamController == null)
            {
                minimapCamController = GameObject.Find("MinimapCamera").GetComponent <CameraController>();
            }
            if (countDownController == null)
            {
                countDownController = GameObject.Find("CountDownController").GetComponent <CountDownController>();
            }
            countDownController.ToggleObject(false);
            // no DigController assigned
            if (digController == null)
            {
                try{
                    digController = GameObject.Find("DigController").GetComponent <DigController>();
                }
                catch (Exception e) {
                    Debug.Log("No digController : " + e.ToString());
                }
            }
            foreach (PlayerInfo inf in connector.playerInfos)
            {
                // Debug.Log(inf);
                if (inf.team == 2)
                {
                    ((FightUIController)uiController).LoadBluePlayerPreview(inf);
                }
                else
                {
                    ((FightUIController)uiController).LoadRedPlayerPreview(inf);
                }
            }
            // if (isOnLocalTest){
            //  bool res = ConnectHost("127.0.0.1");
            //  if (res){
            //      StartMatch();
            //      // isOnLocalTest = false;
            //  }else{
            //      Debug.Log(" Cannot simulate login ");
            //  }
            // }
            Debug.Log("Fight Scene ");
        } catch (Exception e) {
            isOnLocalTest = false;
            Debug.Log("Not Fight Scene : " + e.ToString());
        }
        isStarted = true;
        connector.isSceneTransforming = false;
        Scene tmpScene = SceneManager.GetSceneByName("temp");

        if (tmpScene.IsValid())
        {
            SceneManager.UnloadSceneAsync("temp");
        }
        Debug.Log("[GameController] START DONE");
    }