//  初期化処理
    //**************************************************
    void Start()
    {
        audioSource = gameObject.GetComponent <AudioSource>();
        if (audioSource != null)
        {
            audioSource.clip = audioClip0;
        }

        GameObject soundManager = GameObject.FindGameObjectWithTag("SoundManager");

        // 親タワーのスクリプトの取得
        //--------------------------------------
        tower_script = this.transform.parent.GetComponent <Tower_Script>();

        //  親タワーのスクリプト有無
        //--------------------------------------
        if (tower_script == null)
        {
            // エラーメッセージ
            Debug.LogWarning(this.transform.name + ":親オブジェクトにTower_Scriptが見つかりませんでした。");
        }
        else
        {
            // 吸引するオブジェクトの取得
            SuctionObject = tower_script.SuctionObject;
        }
    }
Exemple #2
0
    //*******************************************
    //  初期化処理
    //*******************************************
    void Start()
    {
        bClear_Burst = false;
        bOver_Burst  = false;
        BurstScale   = 0.0f;

        tower_script = GameObject.Find("Tower").GetComponent <Tower_Script>();
    }
Exemple #3
0
    void Update()
    {
        towerHPslider = GameObject.Find("TowerHPBar").GetComponent <Slider>();

        tower_script = GameObject.Find("Tower").GetComponent <Tower_Script>();

        // スライダーの値0~1の間になるように比率を計算(HitPoint/100)
        towerHPslider.value = (float)tower_script.GetHp() / (float)tower_script.GetMaxHp();
    }
Exemple #4
0
    void Update()
    {
        towerClearslider = GameObject.Find("TowerClearBar").GetComponent <Slider>();

        tower_script = GameObject.Find("Tower").GetComponent <Tower_Script>();

        // スライダーの値0~1の間になるように比率を計算(HitPoint/100)
        //towerClearslider.value = (float)tower_script.GetSunc() / (float)tower_script.GetMaxSunc();
        towerClearslider.value = (float)tower_script.GetScore() / (float)tower_script.GetClearScore();
    }
Exemple #5
0
    private Tower_Script tower_script;  //タワーの取得型

    // Use this for initialization
    void Start()
    {
        tower_script = GameObject.Find("Tower").GetComponent <Tower_Script>();

        akikan_appearance  = GameObject.Find("akikan_appearance").GetComponent <EnemyAppearance>();
        bottle_appearance  = GameObject.Find("bottle_appearance").GetComponent <EnemyAppearance>();
        battery_appearance = GameObject.Find("battery_appearance").GetComponent <EnemyAppearance>();

        //start_frequency = frequency;
        wave = 1;
    }
Exemple #6
0
    //  初期化処理
    //**************************************************
    void Start()
    {
        //  タワー情報の取得
        tower_script = this.transform.parent.GetComponent <Tower_Script>();

        //  タワー:OutPutObjeへの登録
        //-------------------------------
        if (tower_script.OutPutObje == null)
        {
            tower_script.OutPutObje = this.gameObject;
        }

        //  タワースクリプトの有無
        //-------------------------------
        if (tower_script == null)
        {
            Debug.LogWarning(this.transform.name + ":親オブジェクトにTower_Scriptが見つかりませんでした。");
        }
        else
        {
            //エネミーのオブジェクトを取得
            SuctionObject = tower_script.SuctionObject;
        }
    }
Exemple #7
0
 void Start()
 {
     Tower        = GameObject.Find("Tower");
     tower_script = Tower.GetComponent <Tower_Script>();
 }