Esempio n. 1
0
    IEnumerator Start()
    {
        // Spaceshipコンポーネントを取得
        unit = GetComponent <Unit_TAMA>();

        while (true)
        {
            // 弾をプレイヤーと同じ位置/角度で作成
            unit.Shot(transform);

            // shotDelay秒待つ
            yield return(new WaitForSeconds(unit.shotDelay));
        }
    }
 void Start()
 {
     unit           = GetComponent <Unit_TAMA>();
     this.mousePos1 = Input.mousePosition;
 }