Beispiel #1
0
    private void OnLandedTr()
    {
        bgm.PlayBoxSound();
        BoxMathf.CaculateCurrentBox(gameObject, bgm);

        Generator.IsLanded = true;

        bgm.landedBox.name = "prevBox";
    }
Beispiel #2
0
    private void CreateScattering()
    {
        /*
         *  포지션 = 잘라진 박스의 scale - 잘라진 박스의 postion;
         *  크기  = 잘라지지않은 박스의 scale  - 잘라진 박스의 scale;
         *  obj생성Pos =  포지션
         */

        Vector3 createPos = BoxMathf.CalculateCreatePos(bgm);

        GameObject scattering = Instantiate(bgm.currentBox, createPos, Quaternion.identity);

        BoxMathf.CalculateScatter(scattering, bgm);

        boxParent.GetComponent <BoxParent>().AddBox(scattering);
    }