Esempio n. 1
0
    public GameObject prefab_bom;                     //ボム


    /*
     * C#のお話:
     * constは定数という意味。定数なので重力はすべて大文字で宣言。
     */

    // Use this for initialization
    // Gameが始まるとまずここが読まれる
    void Start()
    {
        charaController = GetComponent <CharacterController>();
        c93_UI          = GameObject.Find("GameRoot").GetComponent <C93_UIText>();
        weapon          = new C11_Weapon();                        //C11_Weapon型のweaponの変数のメモリ領域を確保し、そこを参照せよ
        gunBulletNum    = GUN_MAX_BULLETNUM;                       // 弾数代入
        // c93_UI.changeTextGunNum(gunBulletNum); // 下記のinitialize()に集約するため、削除
        c92_Sound = GameObject.Find("Sound").GetComponent <C92_Sound>();
        c93_UI.initialize(weapon.getWeaponType(), gunBulletNum, bomb_used, GetComponent <C13_Status>());                // テキストの初期化
        c06_GameRule = GameObject.Find("GameRoot").GetComponent <C06_GameRule>();
    }
Esempio n. 2
0
 // Start is called before the first frame update
 void Start()
 {
     c93_UI = GetComponent <C93_UIText>();          // 同じオブジェクトが持っている《C93_Ui》コンポーネントを取得
 }
Esempio n. 3
0
 //--------------------------------------------------
 // Start()
 //--------------------------------------------------
 void Start()
 {
     c93_UIText = GameObject.Find("GameRoot").GetComponent <C93_UIText>();
     player     = GameObject.FindGameObjectWithTag("Player") as GameObject;
     c13_Status = player.GetComponent <C13_Status>();
 }