private IEnumerator OnCollisionEnter(Collision collision)
    {
        if (collision.gameObject.tag == "Stick") //StickSタグの付いたゲームオブジェクトと衝突したか判別
        {
            pos = this.transform.position;
            Instantiate(hiteffect, this.transform.position, Quaternion.identity); //パーティクル用ゲームオブジェクト生成
            GetComponent <SphereCollider>().enabled = false;
            GetComponent <MeshRenderer>().enabled   = false;
            //Destroy(this.gameObject); //衝突したゲームオブジェクトを削除
            Instantiate(brokenMellon, pos, quaternion);

            brokenMellon.transform.SetParent(transform, false); //oya0903 プレハブの大きさ設定

            /*SEを鳴らすためのオブジェクトの設定とか*/
            GameObject SEobj;
            SE         SEsc;
            SEobj = GameObject.Find("SEGameObject");
            SEsc  = SEobj.GetComponent <SE>();

            SEsc.Onbreak();

            yield return(new WaitForSeconds(0.2f));

            this.GetComponent <SS>().ScreenShot();
        }
    }
Esempio n. 2
0
    void Start()
    {
        SE = SEobj.GetComponents <AudioSource>();
        Screen.SetResolution(1920, 1080, true);
        player      = playerObj.GetComponent <Player>();
        CardHandNum = player.PlayerZone.Count;
        pool        = cardPoolObj.GetComponent <CardPool>();

        getDoubleUp = doubleUpobj.GetComponent <DoubleUp>();

        showSpace         = showZone.GetComponent <ShowSpace>();
        showSpace.manager = this;

        StartCoroutine(GameStart());
    }
Esempio n. 3
0
    void Start()
    {
        SystemSound = SEobj.GetComponents <AudioSource>();
        Screen.SetResolution(1920, 1080, true);
        player            = playerObj.GetComponent <Player>();
        CardHandNum       = player.PlayerZone.Count;
        pool              = cardPoolObj.GetComponent <CardPool>();
        enemy             = enemyObj.GetComponent <Enemy>();
        DefaultScale      = SelectFrame.transform.localScale;
        defupos           = new Vector3(-3, 1, 0);
        showSpace         = showZone.GetComponent <ShowSpace>();
        showSpace.manager = this;

        StartCoroutine(GameStart());
    }