예제 #1
0
    // Start is called before the first frame update
    void Start()
    {
        sc = this.GetComponent <SystemScript>();

        cam     = transform.Find("Main Camera").gameObject;
        shot_sc = cam.GetComponent <ShotCursor>();

        rig = this.GetComponent <Rigidbody>();

        result_text = GameObject.FindGameObjectWithTag("ResultText").GetComponent <Text>();
    }
    // Use this for initialization
    void Start()
    {
        //MaxEnemyの値の取得
        m_enemyGenerator = FindObjectOfType <EnemyGenerator>();
        m_maxEnemy       = m_enemyGenerator.MaxEnemy;

        m_shotCursor = FindObjectOfType <ShotCursor>();
        m_enemyNum   = m_shotCursor.EnemyNum;

        m_enemyNumText = GameObject.Find("EnemyNumText");
        m_enemyNumText.GetComponent <TextMeshProUGUI>().text = "Enemy " + m_maxEnemy + " / " + m_maxEnemy;
    }