Esempio n. 1
0
    private IEnumerator LastScene()
    {
        UIManager.Instance.FaderOn(true, 1f);
        yield return(new WaitForSeconds(1f));

        LoadSceneManager.LoadScene("MainMenuScene");
    }
    // Start is called before the first frame update
    void Start()
    {
        m_loadSceneManager = FindObjectOfType <LoadSceneManager>();
        m_playerController = FindObjectOfType <PlayerController>();

        if (SceneManager.GetActiveScene().name == "EndScene")//EndSceneの時の処理
        {
            //m_audio.Stop();//音楽を止める
            m_ending = true;//フラグを立てる
            //Debug.Log("start");
        }
        else
        {
            Cursor.visible   = false;                 //カーソルを消す
            Cursor.lockState = CursorLockMode.Locked; //カメラの向きをマウスと連動させる
            m_freelook.MoveToTopOfPrioritySubqueue(); //freelookを優先
            m_magicCircle.SetActive(false);           //魔法陣を非表示

            if (m_goolController)
            {
                return;
            }
            m_goolController = m_goolObject.GetComponent <GoolController>();
            m_audio          = GetComponent <AudioSource>();
        }
    }
Esempio n. 3
0
    private IEnumerator LoadGameOthers()
    {
        UIManager.Instance.FaderOn(true, 1f);
        yield return(new WaitForSeconds(1f));

        LoadSceneManager.LoadScene("MainPlane");
    }
Esempio n. 4
0
    public IEnumerator Login()
    {
        UIManager.Instance.FaderOn(true, 1f);
        yield return(new WaitForSeconds(1f));

        LoadSceneManager.LoadScene(loadSceneName);
    }
Esempio n. 5
0
 // Start is called before the first frame update
 void Start()
 {
     sceneManager = GameObject.Find("SceneManager").GetComponent <LoadSceneManager>();
     SetDestinationTime();
     yusyaObjct  = GameObject.FindWithTag("Player").transform;
     baseCommand = yusyaObjct.GetComponent <BaseCommand>();
 }
Esempio n. 6
0
    private IEnumerator StartLevel(string _sceneName)
    {
        UIManager.Instance.FaderOn(true, 1f);
        yield return(new WaitForSeconds(1f));

        LoadSceneManager.LoadScene(_sceneName);
    }
Esempio n. 7
0
 void EnterGame(PointerEventData e)
 {
     LoadSceneManager.Instance().LoadScene("Combat01", () => {
         AppFacade.Instance.GetManager <GameManager>(ManagerName.Game).LoadinScene("Scene1");
         BattleDirector.Instance.Start();
     });
 }
 public void ChangeSceneGamePlay()
 {
     gamePlayerGoodsInfo = ShopManager.Instance.GetSelectedPlayerInfo();
     LoadSceneManager.LoadScene(LoadSceneManager.sceneNames.gamePlay, playerSprites);
     AdManager.Instance.GameStartAndStopCoroutine();
     //SceneManager.LoadScene("GamePlay", LoadSceneMode.Single);
 }
Esempio n. 9
0
    // Update is called once per frame
    void Update()
    {
        // need to configure input manager to reflect player joy number
        // modify cam script to take player joy number instead of player number

        for (int i = 0; i < nums.Count; i++)
        {
            string key = "joystick " + nums[i] + " button " + 0;
            if (Input.GetKeyDown(key))
            {
                string name = "player" + playerNum;
                PlayerPrefs.SetInt(name, nums[i]);
                nums.RemoveAt(i);
                buttons[playerNum - 1].gameObject.SetActive(false);
                AddPlayer(i);
                i = 0;
                //SoundManager.Instance.PlaySound(audioClips[]);
                break;
            }
        }
        if (PlayerPrefs.GetInt("player1") != 0)
        {
            if (Input.GetKey("joystick " + PlayerPrefs.GetInt("player1") + " button 7"))
            {
                LoadSceneManager lsm = GameObject.Find("start game").GetComponent <LoadSceneManager>();
                lsm.LoadSceneByButton("Main");
            }
        }
    }
Esempio n. 10
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     Canvas = GameObject.Find("Canvas");
 }
Esempio n. 11
0
 // Start is called before the first frame update
 void Start()
 {
     remaningCoin = GameObject.FindGameObjectsWithTag("coin").Length;
     targets      = remaningCoin;
     obstacles    = GameObject.FindGameObjectsWithTag("Obstacle");
     loader       = GetComponent <LoadSceneManager>();
     m_isGameOver = false;
 }
Esempio n. 12
0
 private void Start()
 {
     if (instance != null)
     {
         Destroy(this.gameObject);
         return;
     }
     instance = this;
 }
Esempio n. 13
0
 void Awake()
 {
     if (_instance == null)
     {
         _instance = this;
     }
     _LoadBar       = transform.FindChild("LoadBar").GetComponent <UISlider>();
     _LoadBar.value = 0;
 }
Esempio n. 14
0
    public IEnumerator BackToMenu(float delayTime = 2.0f)
    {
        AddHistoryScore();
        yield return(new WaitForSecondsRealtime(delayTime));

        UIManager.Instance.FaderOn(true, 1f);
        yield return(new WaitForSecondsRealtime(1));

        LoadSceneManager.LoadScene(1);
    }
Esempio n. 15
0
 public static void LoadScene(string scenePath, Action func = null)
 {
     LoadSceneManager.Instance().LoadScene(scenePath, () =>
     {
         if (func != null)
         {
             func();
         }
     });
 }
Esempio n. 16
0
 public static void LoadScene(string scenePath, LuaFunction onLoadFinished = null)
 {
     LoadSceneManager.Instance().LoadScene(scenePath, () =>
     {
         if (onLoadFinished != null)
         {
             onLoadFinished.Call();
             onLoadFinished.Dispose();
         }
     });
 }
Esempio n. 17
0
 private void ShowInterstitial()
 {
     if (this.interstitial.IsLoaded())
     {
         this.interstitial.Show();
         LoadSceneManager.GoToNewbie();
     }
     else
     {
         MonoBehaviour.print("Interstitial is not ready yet");
     }
 }
 void SetInitialReferences()
 {
     try
     {
         loadSceneManager = FindObjectOfType <LoadSceneManager>();
     }
     catch (Exception e)
     {
         Debug.LogException(e, this);
         loadSceneManager = null;
     }
 }
Esempio n. 19
0
 private void Awake()
 {
     // LoadSceneMangerは常に一つだけにする
     if (loadSceneManager == null)
     {
         loadSceneManager = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
 }
Esempio n. 20
0
    private IEnumerator StartLevel(string loadSceneName)
    {
        GameManager.Instance.GameOverTriggerEvent();
        UIManager.Instance.FaderOn(true, 1f);
        yield return(new WaitForSeconds(1f));

        LoadSceneManager.LoadScene(loadSceneName);
        GameManager.Instance.GameManagerInit();
        if (loadSceneName != "MainMenuScene")
        {
            GameManager.Instance.GameStartTriggerEvent();
        }
        UIManager.Instance.FaderOn(false, 1f);
    }
Esempio n. 21
0
    private void Awake()
    {
        if (!instance)
        {
            instance = this;
        }
        else
        {
            Destroy(gameObject);
        }

        loadSceneManager = GameObject.Find("LoadSceneManager").GetComponent <LoadSceneManager>();
        Assert.IsNotNull(loadSceneManager, "Failed to access LoadSceneManager.");
    }
Esempio n. 22
0
 private void Awake()
 {
     if (Instance != null)
     {
         if (Instance != this)
         {
             Destroy(gameObject);
         }
     }
     else
     {
         Instance = this;
         DontDestroyOnLoad(this);
     }
 }
Esempio n. 23
0
    //---------------------------------------------------------
    /// <summary>
    /// 热更完成,启动游戏
    /// </summary>

    void Update()
    {
        if (!IsGameStart)
        {
            return;
        }
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            ExitGameConfirm();
        }

        // 日志中心
        //LogCenter.Instance().Update();
        LoadSceneManager.Instance().Update();
    }
Esempio n. 24
0
 private void Dispatch()
 {
     while (sEvents.Count > 0)
     {
         if (LoadSceneManager.Instance().Isloading())
         {
             break;
         }
         lock (obj)
         {
             KeyValuePair <int, byte[]> msg = sEvents.Dequeue();
             DispatchNetMessage(msg.Key, msg.Value);
         }
     }
 }
Esempio n. 25
0
    //---------------------------------------------------------
    /// <summary>
    /// 热更完成,启动游戏
    /// </summary>

    void Update()
    {
        if (!IsGameStart)
        {
            return;
        }
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            ExitGameConfirm();
        }

        // 日志中心
        //LogCenter.Instance().Update();
        LoadSceneManager.Instance().Update();

        EntityBehaviorMgr.Instance().UpdateBehavior(Time.deltaTime);
    }
Esempio n. 26
0
    // Use this for initialization
    void Start()
    {
        if (targetObject_Green == null)
        {
            Debug.Log("タヌキのリザルトオブジェクトの設定してー");
        }

        if (targetObject_Sand == null)
        {
            Debug.Log("キツネのリザルトオブジェクトの設定してー");
        }

        if (targetObject_Ice == null)
        {
            Debug.Log("イヌのリザルトオブジェクトの設定してー");
        }

        if (targetObject_Town == null)
        {
            Debug.Log("ネコのリザルトオブジェクトの設定してー");
        }

        charInfo    = GameObject.Find("CharactorInfo").GetComponent <CharactorInfo>();
        player      = netConnector.GetLocalPlayer();
        scoreObject = GameObject.Find("ResultManager/ResultObjectScore/Canvas/Score000");

        GameObject manager = GameObject.Find("LoadSceneManager");

        if (null != manager)
        {
            loadSceneManager = manager.GetComponent <LoadSceneManager> ();
        }

        GameObject audio = GameObject.Find("AudioManager");

        if (null != audio)
        {
            audioManager = audio.GetComponent <AudioManager> ();
        }
    }
Esempio n. 27
0
    // Use this for initialization
    void Start()
    {
        GameObject manager = GameObject.Find("LoadSceneManager");

        if (null != manager)
        {
            loadSceneManager = manager.GetComponent <LoadSceneManager> ();
        }

        //チューとリアルマネージャの削除
        GameObject tutoMana = GameObject.Find("TutorialManager");

        if (null != tutoMana)
        {
            tutoMana.GetComponent <TutorialManager> ().ClearFlg();
            Destroy(tutoMana.gameObject);
            tutoManaDeleteFlg = true;
        }

        //キャラクターインフォの削除
        GameObject charaInfo = GameObject.Find("CharactorInfo");

        if (null != charaInfo)
        {
            charaInfo.GetComponent <CharactorInfo> ().ClearFlg();
            Destroy(charaInfo.gameObject);
            charaInfoDeleteFlg = true;
        }

        GameObject audio = GameObject.Find("AudioManager");

        if (null != audio)
        {
            audioManager = audio.GetComponent <AudioManager> ();
        }

        audioManager.Play_SE(AudioManager.SE.Ending);
    }
Esempio n. 28
0
 private void Awake()
 {
     Instance = this;
 }
 private void SetInitialReferences()
 {
     loadSceneManager = FindObjectOfType <LoadSceneManager>();
 }
    private IEnumerator StartLevel(string loadSceneName)
    {
        yield return(new WaitForSeconds(1f));

        LoadSceneManager.LoadScene(loadSceneName);
    }