コード例 #1
0
    // Use this for initialization
    void Start()
    {
        Debug.Log("start Start");

        // input
        GameObject   inputgo  = new GameObject("inputManager");
        inputManager inputmgr = inputgo.AddComponent <inputManager>();

        inputmgr.Init();
        GameObject.DontDestroyOnLoad(inputgo);

        // ui
        GameObject uigo  = new GameObject("uiManager");
        uiManager  uimgr = uigo.AddComponent <uiManager>();

        uimgr.Init();
        GameObject.DontDestroyOnLoad(uigo);

        // lua
        GameObject go     = new GameObject("luaManager");
        luaManager luamgr = go.AddComponent <luaManager>();

        luamgr.Init();
        GameObject.DontDestroyOnLoad(go);
    }
コード例 #2
0
 // Use this for initialization
 void Start()
 {
     if (instance = null)
     {
         instance = this;
     }
 }
コード例 #3
0
    void Update()
    {
        if (_nextStage > 0)
        {
            _waitTime += Time.deltaTime;

            // if(_waitTime > _loadingTime - 0.5f)
            {
                //  _animator.SetBool("loading.end", true);
                //로딩시간 다 차기전 조금 일찍 (0.5초정도)미리 fadeout이 일어나도록
            }

            //몇초간 기다렸다가 로딩시간이 차면
            if (_waitTime > _loadingTime)
            {
                uiManager uiMgr = FindObjectOfType <uiManager>();
                uiMgr.Show("UI_loading", false); // 로딩이 끝아면 ui loading을 false로
                uiMgr.Show("Ui_play", true);     // 스테이지 이동시 ui play를 다시 true로


                //다음에 로딩화면을 또 사용할테니, 값들을 다시리셋
                _waitTime  = 0.0f;
                _nextStage = 0;
            }
        }
    }
コード例 #4
0
ファイル: uiManager.cs プロジェクト: hanish2760/ZigZag
 public void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
コード例 #5
0
 void Awake()
 {
     if (Instance == null && Instance != this)
     {
         Instance = this;
     }
 }
コード例 #6
0
ファイル: bulletStore.cs プロジェクト: ancal258/Dragon_Copy
    // Use this for initialization
    void Start()
    {
        um = GameObject.Find("TextUI").GetComponent <uiManager>();
        bm = GameObject.Find("bulletUI").GetComponent <bulletManager>();

        sr        = GetComponent <SpriteRenderer>();
        bulletbtn = GameObject.Find("bulletUp");
    }
コード例 #7
0
 // Use this for initialization
 void Start()
 {
     if (instance == null)
     {
         instance       = this;
         Time.timeScale = 1f;
     }
 }
コード例 #8
0
    public void Start()
    {
        gameOver = false;
        EnemyCarMove.stopCubes = false;
        score = 0;
        ui    = GameObject.FindGameObjectWithTag("uiManager").GetComponent <uiManager>();

        InvokeRepeating("scoreUpdate", scoreIncInterval, scoreIncInterval);
    }
コード例 #9
0
ファイル: uiManager.cs プロジェクト: brotibi/Cubez
    //	public GameObject cubo;
    //	public GameObject defaultCube;

    // Use this for initialization
    void Start()
    {
        score     = 0;
        Instance  = this;
        highScore = PlayerPrefs.GetInt("highScore", 0);
        gameOver  = false;

        whiteCube.gameObject.SetActive(true);
    }
コード例 #10
0
    public void Awake()
    {
        if (instance != null)
        {
            Destroy(this);
        }

        instance = this;
    }
コード例 #11
0
ファイル: GameManager.cs プロジェクト: cebollinos11/chicken
    // Use this for initialization
    void Start()
    {
        UI = GetComponent <uiManager>();

        currentRun = new runClass();
        currentRun.init();

        StartNewChicken();
    }
コード例 #12
0
ファイル: GameManager.cs プロジェクト: cebollinos11/chicken
	// Use this for initialization
	void Start () {
        UI = GetComponent<uiManager>();

        currentRun = new runClass();
        currentRun.init();
        
        StartNewChicken();
        
	
	}
コード例 #13
0
 void Start()
 {
     boyRigidbody = GetComponent <Rigidbody2D>();
     myanimation  = GetComponent <Animator>();
     myCollider   = GetComponent <Collider2D>();
     m_Scene      = SceneManager.GetActiveScene();
     if (m_Scene.name == "level1")
     {
         ui = GameObject.FindGameObjectWithTag("manager").GetComponent <uiManager>();
     }
 }
コード例 #14
0
 // Use this for initialization
 void Awake()
 {
     if (instance != null && instance != this)
     {
         Destroy(gameObject);
     }
     else
     {
         instance = this;
     }
 }
コード例 #15
0
    void Start()
    {
        ///if (currentPlatformAndroid == true)
        //	Debug.Log ("Android");
        //	else
        //	Debug.Log ("Windows");

        ui = GetComponent <uiManager> ();


        position = transform.position;
    }
コード例 #16
0
    // Use this for initialization
    void Start()
    {
        cd  = this.GetComponent <chatDecoder>();
        irc = this.GetComponent <TwitchIRC>();
        qm  = this.GetComponent <questionManager>();
        ui  = this.GetComponent <uiManager>();
        qm.loadNewQuestion();

        roundNumber = questionsPerRound;

        InvokeRepeating("tick", 5, 1);
    }
コード例 #17
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != null)
     {
         Debug.Log("instance already exists");
         Destroy(this);
     }
 }
コード例 #18
0
 void Start()
 {
     SetupUi();
     OVRDevice.ResetOrientation();
     // gets the renderer of the child, parent is an empty controller
     selectionPlaneRenderer = selectionPlane.GetChild(0).renderer;
     // get instance of output box.
     manager      = (uiManager)manageSource.GetComponent(typeof(uiManager));
     textVal      = textBox.GetComponent <Text>();
     textVal.text = "";
     eqInfo       = GraphData.gd;
     transform.parent.gameObject.SetActive(false);
 }
コード例 #19
0
    void Start()
    {
        _uiMgr = FindObjectOfType <uiManager>();

        /*
         *  if(PlayerPrefs.HasKey(KEY_PLAYER_POS_X) == true &&
         *  PlayerPrefs.HasKey(KEY_PLAYER_POS_Y)== true)
         *  {
         *   float posX = PlayerPrefs.GetFloat(KEY_PLAYER_POS_X);
         *   float posY = PlayerPrefs.GetFloat(KEY_PLAYER_POS_Y);
         *
         *   float posZ = transform.position.z;
         *   transform.position = new Vector3(posX, posY, posZ);
         *  }
         */

        InitHP();
    }
コード例 #20
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.gameObject.name == "player")
        {
            if (collision is BoxCollider2D)
            {
                Debug.Log("stage clear");
                uiManager uiMgr = FindObjectOfType <uiManager>();
                uiMgr.Show("Ui_loading", true);

                Ui_loading uiLoding = FindObjectOfType <Ui_loading>();
                uiLoding.Gonext(_stageNum + 1);
            }
            //if(_stageNum == 10)
            // {
            //    SceneManager.LoadScene((int)SCENE.GAME2);
            // }
        }
    }
コード例 #21
0
 void Awake()
 {
     if (Instance == null && Instance != this)
         Instance = this;
 }
コード例 #22
0
 // Use this for initialization
 void Start()
 {
     thePlayer       = GameObject.FindGameObjectWithTag("Player");
     thePlayerHealth = thePlayer.GetComponent <playerHealth> ();
     pointsToGive    = FindObjectOfType <uiManager> ();
 }
コード例 #23
0
 // Use this for initialization
 void Start()
 {
     coinCheck = false;
     um        = GameObject.Find("TextUI").GetComponent <uiManager>();
 }
コード例 #24
0
ファイル: uiManager.cs プロジェクト: Alexxfinal/AudioGame
 private void Start()
 {
     current = this;
     showSongMenu();
 }
コード例 #25
0
 private void Start()
 {
     ui = panel.GetComponent <uiManager>();
 }
コード例 #26
0
ファイル: lottoScript.cs プロジェクト: ancal258/Dragon_Copy
 // Use this for initialization
 void Start()
 {
     um       = GameObject.Find("TextUI").GetComponent <uiManager>();
     sr       = GetComponent <SpriteRenderer>();
     lottobtn = GameObject.Find("lotto");
 }
コード例 #27
0
    // Use this for initialization
    void Start()
    {
        um = GameObject.Find("TextUI").GetComponent <uiManager>();

        selfTimer = Time.time + 0.1f;
    }
コード例 #28
0
 // Use this for initialization
 void Start()
 {
     dieCommand = FindObjectOfType <uiManager> ();
 }
コード例 #29
0
 // Start is called before the first frame update
 void Start()
 {
     attackPattern1.angularVelocity = 70;
     player = GameObject.FindWithTag("Player");
     ui     = GameObject.FindWithTag("UI").GetComponent <uiManager>();
 }
コード例 #30
0
ファイル: buyPet1.cs プロジェクト: ancal258/Dragon_Copy
 // Use this for initialization
 void Start()
 {
     um      = GameObject.Find("TextUI").GetComponent <uiManager>();
     sr      = GetComponent <SpriteRenderer>();
     pet1btn = GameObject.Find("brownBaby");
 }
コード例 #31
0
 // Start is called before the first frame update
 void Start()
 {
     uiMa = gameObject.GetComponent <uiManager>();
 }