Пример #1
0
    void PictureSetGenerate()
    {
        GameObject ps = Instantiate(pictureSetPrefab);

        lastGeneratedPictureSet          = ps.transform;
        lastGeneratedPictureSet.position = pictureSetInitPosition.position;

        //正解の色の決定
        DB.ColorID correctColor = ColorDecision();

        //マテリアルの作成
        Material currentMaterial = materialBuffer[currentMaterialIndex];

        MakeMaterial(currentMaterial);

        //ChangeColorの初期化
        ChangeColor changeColor = ps.GetComponent <ChangeColor>();

        changeColor.Init(currentObjectID, correctColor, currentMaterial);

        //Focusの初期化
        Focus focus = ps.GetComponent <Focus>();

        focus.Init(currentObjectID, focusFrame);

        currentObjectID++;
        currentMaterialIndex = (currentMaterialIndex + 1) % materialBufferNum;
    }