Beispiel #1
0
        private void Start()
        {
            tangram    = GameObject.Find("Tangram").GetComponent <Tangram>();
            placerect  = GameObject.Find("placeRect");
            chessBoard = GameObject.Find("chessboard");



            StartCoroutine("waitaframe");
        }
Beispiel #2
0
        void OnMouseDown()
        {
            GetComponent <MeshRenderer>().GetComponent <Renderer>().material.color = Color.white;

            //init game
            Tangram tg = GameObject.Find("Tangram").GetComponent <Tangram>();

            tg.onlyClear();

            //set difficulty and level
            GameData.difficulty      = 0;
            GameData.instance.cLevel = Random.Range(0, GameData.totalLevel[GameData.difficulty]);

            //start game;
            tg.initSingleMode();
        }