示例#1
0
        void FireAOE()
        {
            GameObject bulletObject = new GameObject();
            tAOE       bullet       = bulletObject.AddComponent <tAOE>();

            bullet.init(m.GetTarget());
            bullet.transform.position = new Vector3(targetx, targety, 0);
        }
示例#2
0
        public void init(tAOE owner)
        {
            this.owner = owner;

            transform.parent        = owner.transform;                  // Set the model's parent to the gem.
            transform.localPosition = new Vector3(0, 0, 0);             // Center the model on the parent.
            name = "Boss Model";                                        // Name the object.

            mat             = GetComponent <Renderer>().material;
            mat.shader      = Shader.Find("Sprites/Default");                           // Tell the renderer that our textures have transparency. // Get the material component of this quad object.
            mat.mainTexture = Resources.Load <Texture2D>("Textures/Boss2AOE");          // Set the texture.  Must be in Resources folder.
            clock           = 0;
        }