コード例 #1
0
ファイル: Dice.cs プロジェクト: Olehadash/Monoppoly
    public void Build(GameObject parent)
    {
        dice        = parent.transform.parent.GetComponent <FieldBuilder>().GetSprite(2);
        dicesNum[0] = parent.transform.parent.GetComponent <FieldBuilder>().GetSprite(3);
        dicesNum[1] = parent.transform.parent.GetComponent <FieldBuilder>().GetSprite(4);
        dicesNum[2] = parent.transform.parent.GetComponent <FieldBuilder>().GetSprite(5);
        dicesNum[3] = parent.transform.parent.GetComponent <FieldBuilder>().GetSprite(6);
        dicesNum[4] = parent.transform.parent.GetComponent <FieldBuilder>().GetSprite(7);
        dicesNum[5] = parent.transform.parent.GetComponent <FieldBuilder>().GetSprite(8);

        back = new GraphickObject();
        back.Build(parent, "Dice");
        back.setImage(dice);
        back.SetLayer(3);
        back.setPosion(new Vector3(0, 2.15f, 0));
        back.setScale(new Vector3(0.1f, 0.1f, 0));
        back.AddCollider();



        num.Build(back.GetGameObject(), "DiceNum");
        num.setImage(dicesNum[3]);
        num.SetLayer(4);
        num.setPosion(new Vector3(0, 2.15f, 0));
        num.setScale(new Vector3(1f, 1f, 0));
        Debug.Log("Rbefore " + num);
        back.AddDiceComponent().ResetParametrs(dice, dicesNum, back, num);
    }