示例#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>();
    }
示例#2
0
    private int bomb_explosion_sound = 2;               // 投げた時の音No.

    // Use this for initialization
    void Start()
    {
        c92Sound   = GameObject.Find("Sound").GetComponent <C92_Sound>();
        c13_Status = GetComponent <C13_Status>();
        StartCoroutine("bom");         //コルーチン開始
    }