Пример #1
0
    // Use this for initialization
    void Start()
    {
        //BMIゲージ(slider)を取得する
        BMIGuage = GameObject.Find("BMIguage").GetComponent<Slider>();

        bmiManager = GameObject.Find("BMIManager").GetComponent<BMIManager>();

        parentEnemy = GameObject.Find("Enemy");
    }
Пример #2
0
    IEnumerator Start()
    {
        yield return new WaitForSeconds(0.01f);
        while(player == null)
        {
            player = GameObject.Find("PlayerSibo");
            //操作説明コンポーネント
            if (howToText == null)
            {
                //モーダル取得・非表示
                modal = GameObject.Find("PausePack").transform.GetChild(0).gameObject;
                nowStage = modal.transform.GetChild(2).gameObject;
                howToPlayPanel = modal.transform.GetChild(1).gameObject;
                howToPlay = howToPlayPanel.transform.GetChild(0).gameObject;
                howToText = howToPlay.transform.GetChild(1).gameObject.GetComponent<Text>();
                howToPlayPanel.SetActive(false);
                modal.SetActive(false);
            }
            yield return null;
            //初期化
            tfip = false;
            pushButton = false;
            if (player != null)
            {
                if(player.activeSelf == true)
                {
                    //BMIManagerコンポーネント
                    bmiManager = player.GetComponent<BMIManager>();
                    tEffect = GameObject.Find("TEffect").GetComponent<ParticleSystem>();

                    tEffect.Stop();

                    anim = player.GetComponent<Animator>();
                    yield break;
                }
            }
        }
    }
Пример #3
0
    void Start()
    {
        //モーダル取得・非表示
        modal = GameObject.Find("Modal");
        //print(modal);
        modal.SetActive(false);

        //BMIManagerコンポーネント
        bmiManager = FindObjectOfType<BMIManager>();

        //初期化
        tfip = false;
        pushButton = false;
    }
Пример #4
0
 // Use this for initialization
 void Start()
 {
     bmiManager = GameObject.Find("PlayerSibo").GetComponent<BMIManager>();
 }
Пример #5
0
    void Start()
    {
        //デバッグ用
        //bmi = 10f;

        moveOk = false;

        //BMIManager
        bmiManager = GetComponent<BMIManager>();
        //攻撃判定オフ
        button = GameObject.Find("Screen").GetComponent<Buttons>();

        //モーションをいじるため
        anim = GetComponent<Animator>();

        //オーディオソースコンポーネント
        audio = GetComponent<AudioSource>();
        //オーディオクリップをリソースフォルダから取得
        for(int i = 0; i < audioSorce.Length; i++)
        {
            audioSorce[i] = (AudioClip)Resources.Load("SEfects/" + audioList[i]);
        }

        //波動非表示
        hado = transform.GetChild(1).gameObject;
        hado.SetActive(false);

        //攻撃判定用
        jab = GameObject.FindWithTag("Jab").GetComponent<SphereCollider>();
        smash = GameObject.FindWithTag("Smash").GetComponent<SphereCollider>();
        jab.enabled = false;
        smash.enabled = false;

        //アニメーターステート
        //Stanby
        stateHash[0] = 17588480;
        //Jab1
        stateHash[1] = 1284765916;
        //Jab2
        stateHash[2] = -711284378;
        //Smash
        stateHash[3] = -355276023;

        hitefect = GetComponent<Hitefect>();
    }