Пример #1
0
        public void UpdateLetterDisplay()
        {
            GameObject text = Tf.GetChild(0).GetChild(0).gameObject;

            TextMesh tm = text.GetComponent(typeof(TextMesh)) as TextMesh;

            if (tm != null)
            {
                tm.text = this.ASCIIString;
            }
        }
Пример #2
0
        private void BurnTile()
        {
            Tf.GetChild(0).gameObject.GetComponent <MeshRenderer>().material = BurningMat;
            Transform ll = boardScript.NewLavaLight();

            ll.SetParent(Tf.GetChild(0), false);
            ll.name = "Point light";
            // Need a point light
            //Tf.GetChild(0).gameObject.SetActive(true);
            //GameObject t = (GameObject)Instantiate(LavaLight, new Vector3(0, 0, 0), Quaternion.identity);
            //t.transform.SetParent(Tf);
            //                    Object.Instantiate();
            //Tf.GetChild(0).gameObject.SetActive(true);
            LetterAnimator.SetTrigger(Burning);
        }
Пример #3
0
        public void UpdateMaterial()
        {
            switch (tt)
            {
            case TileTypes.Burning:
                BurnTile();
                break;

            case TileTypes.Normal:
                Tf.GetChild(0).gameObject.GetComponent <MeshRenderer>().material = NoramlMat;
                break;

            case TileTypes.WordDouble:
                Tf.GetChild(0).gameObject.GetComponent <MeshRenderer>().material = WordDoubleMat;
                break;

            case TileTypes.WordTriple:
                Tf.GetChild(0).gameObject.GetComponent <MeshRenderer>().material = WordTripleMat;
                break;

            case TileTypes.LetterDouble:
                Tf.GetChild(0).gameObject.GetComponent <MeshRenderer>().material = LetterDoubleMat;
                break;

            case TileTypes.LetterTriple:
                Tf.GetChild(0).gameObject.GetComponent <MeshRenderer>().material = LetterTripleMat;
                break;

            case TileTypes.Manna:
                Tf.GetChild(0).gameObject.GetComponent <MeshRenderer>().material = ManaMat;
                break;

            default:
                Tf.gameObject.GetComponent <MeshRenderer>().material = NoramlMat;
                break;
            }
        }