Ejemplo n.º 1
0
    private AudioMaker damageAudioMaker;                                // ダメージ音メーカー.

    void Start()
    {
        // ダメージ音メーカーのインスタンスを取得.
        damageAudioMaker =
            GameObject.FindGameObjectWithTag("EffectDamageAudioMaker")
            .GetComponent <AudioMaker>();

        // 音の再生.
        if (damageAudioMaker)
        {
            damageAudioMaker.Play(this.gameObject);
        }

        // 子オブジェクトにある全てのエフェクトのオブジェクトを取得.
        effects = GetComponentsInChildren <ParticleSystem>();

        // 全てのエフェクトを再生.
        for (int i = 0; i < effects.Length; i++)
        {
            if (effects[i])
            {
                effects[i].Play();
                playingCount++;
            }
        }
    }
Ejemplo n.º 2
0
        /// <summary>
        /// Prepares all fields for saving a new animation.
        /// </summary>
        /// <param name="animationPath">The animation folder's path.</param>
        void PrepareNewAnimation(string animationPath)
        {
            array = CopyTemplateArray();

            if (profile.Frames is object)
            {
                frameMaker = new FrameMaker(animationPath, profile, array);
            }
            else
            {
                frameMaker = null;
            }

            if (profile.Audio is object)
            {
                audioMaker = new AudioMaker(animationPath, profile, array);
            }
            else
            {
                audioMaker = null;
            }

            currentSorter[0] = 0;

            finished[0] = false;
        }
Ejemplo n.º 3
0
    void Start()
    {
        // 戦闘空間のインスタンスを取得.
        battleSpaceContoller =
            GameObject.FindGameObjectWithTag("BattleSpace")
            .GetComponent <BattleSpaceController>();

        // 爆発音メーカーのインスタンスを取得.
        bombAudioMaker =
            GameObject.FindGameObjectWithTag("EffectBombAudioMaker")
            .GetComponent <AudioMaker>();

        // 音の再生.
        if (bombAudioMaker)
        {
            bombAudioMaker.Play(this.gameObject);
        }

        // 子オブジェクトにある全てのエフェクトのオブジェクトを取得.
        effects = GetComponentsInChildren <ParticleSystem>();

        // 全てのエフェクトを再生.
        for (int i = 0; i < effects.Length; i++)
        {
            if (effects[i])
            {
                effects[i].Play();
                playingCount++;
            }
        }
    }
Ejemplo n.º 4
0
    void Start()
    {
        // 取得战斗空间的实例
        battleSpaceContoller =
            GameObject.FindGameObjectWithTag("BattleSpace")
            .GetComponent <BattleSpaceController>();

        // 取得爆炸声音生成器的实例
        bombAudioMaker =
            GameObject.FindGameObjectWithTag("EffectBombAudioMaker")
            .GetComponent <AudioMaker>();

        // 播放声音
        if (bombAudioMaker)
        {
            bombAudioMaker.Play(this.gameObject);
        }

        // 获取子对象中的特效对象
        effects = GetComponentsInChildren <ParticleSystem>();

        // 播放所有的特效
        for (int i = 0; i < effects.Length; i++)
        {
            if (effects[i])
            {
                effects[i].Play();
                playingCount++;
            }
        }
    }
Ejemplo n.º 5
0
    private AudioMaker damageAudioMaker;                                // 损坏音效生成器

    void Start()
    {
        // 获取损坏音效生成器的实例
        damageAudioMaker =
            GameObject.FindGameObjectWithTag("EffectDamageAudioMaker")
            .GetComponent <AudioMaker>();

        // 播放音效
        if (damageAudioMaker)
        {
            damageAudioMaker.Play(this.gameObject);
        }

        // 获取子对象中存在的所有特效对象
        effects = GetComponentsInChildren <ParticleSystem>();

        // 播放所有的特效
        for (int i = 0; i < effects.Length; i++)
        {
            if (effects[i])
            {
                effects[i].Play();
                playingCount++;
            }
        }
    }
Ejemplo n.º 6
0
    private bool isClear = false;                               // ロックオンレーザー消去.

    void Start()
    {
        // 索敵レーザーのインスタンスを取得.
        scoutingLaser = GameObject.FindGameObjectWithTag("ScoutingLaser");

        // ロックオンレーザー音メーカーのインスタンスを取得.
        audioMaker = GameObject.FindGameObjectWithTag("LockonLaserAudioMaker").GetComponent <AudioMaker>();

        // 音の再生.
        if (audioMaker)
        {
            audioMaker.Play(this.gameObject);
        }
    }
    private bool isClear = false;                               // 销毁锁定激光

    void Start()
    {
        // 获取索敌激光的实例
        scoutingLaser = GameObject.FindGameObjectWithTag("ScoutingLaser");

        // 获取锁定激光的音效生成器实例
        audioMaker = GameObject.FindGameObjectWithTag("LockonLaserAudioMaker").GetComponent <AudioMaker>();

        // 播放音效
        if (audioMaker)
        {
            audioMaker.Play(this.gameObject);
        }
    }