static int SetMaterial(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 3 && TypeChecker.CheckTypes <int>(L, 3))
            {
                UnityEngine.CanvasRenderer obj  = (UnityEngine.CanvasRenderer)ToLua.CheckObject(L, 1, typeof(UnityEngine.CanvasRenderer));
                UnityEngine.Material       arg0 = (UnityEngine.Material)ToLua.CheckObject <UnityEngine.Material>(L, 2);
                int arg1 = (int)LuaDLL.lua_tonumber(L, 3);
                obj.SetMaterial(arg0, arg1);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes <UnityEngine.Texture>(L, 3))
            {
                UnityEngine.CanvasRenderer obj  = (UnityEngine.CanvasRenderer)ToLua.CheckObject(L, 1, typeof(UnityEngine.CanvasRenderer));
                UnityEngine.Material       arg0 = (UnityEngine.Material)ToLua.CheckObject <UnityEngine.Material>(L, 2);
                UnityEngine.Texture        arg1 = (UnityEngine.Texture)ToLua.ToObject(L, 3);
                obj.SetMaterial(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.CanvasRenderer.SetMaterial"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
 static public int SetMaterial(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (matchType(l, argc, 2, typeof(UnityEngine.Material), typeof(UnityEngine.Texture)))
         {
             UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l);
             UnityEngine.Material       a1;
             checkType(l, 2, out a1);
             UnityEngine.Texture a2;
             checkType(l, 3, out a2);
             self.SetMaterial(a1, a2);
             pushValue(l, true);
             return(1);
         }
         else if (matchType(l, argc, 2, typeof(UnityEngine.Material), typeof(int)))
         {
             UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l);
             UnityEngine.Material       a1;
             checkType(l, 2, out a1);
             System.Int32 a2;
             checkType(l, 3, out a2);
             self.SetMaterial(a1, a2);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
	// Use this for initialization
	void Start ()
	{
		rectTransform = GetComponent<RectTransform>();
		canvasRenderer = GetComponent<CanvasRenderer>();
		//canvasRenderer.renderer.enabled = false;
		transform.position = Vector3.one*10000.0f;
	}
    static int GetMaterial(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 1)
            {
                UnityEngine.CanvasRenderer obj = (UnityEngine.CanvasRenderer)ToLua.CheckObject(L, 1, typeof(UnityEngine.CanvasRenderer));
                UnityEngine.Material       o   = obj.GetMaterial();
                ToLua.Push(L, o);
                return(1);
            }
            else if (count == 2)
            {
                UnityEngine.CanvasRenderer obj = (UnityEngine.CanvasRenderer)ToLua.CheckObject(L, 1, typeof(UnityEngine.CanvasRenderer));
                int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
                UnityEngine.Material o = obj.GetMaterial(arg0);
                ToLua.Push(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.CanvasRenderer.GetMaterial"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Ejemplo n.º 5
0
    public override void gaxb_init()
    {
        gameObject = new GameObject ("<Movie/>", typeof(RectTransform));

        canvasRenderer = gameObject.AddComponent<CanvasRenderer> ();
        image = gameObject.AddComponent<RawImage> ();

        if (color != null) {
            image.color = color.Value;
        }

        if (resourcePath != null) {

            // Why, oh why are movie textures not supported in iOS?
            #if (UNITY_IOS || UNITY_ANDROID || UNITY_WEBGL)

            #else
            // Set texture
            MovieTexture tex = Resources.Load (resourcePath) as MovieTexture;
            if (tex != null) {
                image.texture = tex;

                tex.Play ();
                tex.loop = looping;
            }
            #endif

        }
    }
Ejemplo n.º 6
0
 static public int set_popMaterialCount(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l);
         int v;
         checkType(l, 2, out v);
         self.popMaterialCount = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
Ejemplo n.º 7
0
 void Awake()
 {
     _backgroundRenderer = gameObject.transform.Find("Background").GetComponent<CanvasRenderer>();
     _indicatorRenderer = gameObject.transform.Find("Indicator").GetComponent<CanvasRenderer>();
     _backgroundRenderer.SetAlpha(_currentAlpha);
     _indicatorRenderer.SetAlpha(_currentAlpha);
 }
Ejemplo n.º 8
0
 static public int get_absoluteDepth(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.absoluteDepth);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
 static public int SetVertices(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 2)
         {
             UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l);
             System.Collections.Generic.List <UnityEngine.UIVertex> a1;
             checkType(l, 2, out a1);
             self.SetVertices(a1);
             pushValue(l, true);
             return(1);
         }
         else if (argc == 3)
         {
             UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l);
             UnityEngine.UIVertex[]     a1;
             checkType(l, 2, out a1);
             System.Int32 a2;
             checkType(l, 3, out a2);
             self.SetVertices(a1, a2);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int GetMaterial(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 1)
         {
             UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l);
             var ret = self.GetMaterial();
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (argc == 2)
         {
             UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l);
             System.Int32 a1;
             checkType(l, 2, out a1);
             var ret = self.GetMaterial(a1);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 11
0
 // Use this for initialization
 void Start()
 {
     textRenderer = GetComponent<CanvasRenderer>();
     fadeTimeRemaining = fadeSec;
     state = DisplayState_e.FADE_IN;
     textRenderer.SetAlpha(0);
 }
Ejemplo n.º 12
0
 static public int constructor(IntPtr l)
 {
     UnityEngine.CanvasRenderer o;
     o = new UnityEngine.CanvasRenderer();
     pushObject(l, o);
     return(1);
 }
Ejemplo n.º 13
0
    void Start()
    {
        _cr = GetComponent<CanvasRenderer>();

        _fa = GetComponent<FadeAnimation>();
        _fa.setAlpha(0f);
    }
Ejemplo n.º 14
0
        public void AddInlineGraphicsChild()
        {
            if (m_inlineGraphic != null)
            {
                //Debug.LogWarning("A child Inline Graphics object already exists.");
                return;
            }

            GameObject inlineGraphicObj = new GameObject("Inline Graphic");

            m_inlineGraphic = inlineGraphicObj.AddComponent<InlineGraphic>();

            m_inlineGraphicRectTransform = inlineGraphicObj.GetComponent<RectTransform>();
            m_inlineGraphicCanvasRenderer = inlineGraphicObj.GetComponent<CanvasRenderer>();

            m_inlineGraphicRectTransform.SetParent(transform, false);
            m_inlineGraphicRectTransform.localPosition = Vector3.zero;
            m_inlineGraphicRectTransform.anchoredPosition3D = Vector3.zero;
            m_inlineGraphicRectTransform.sizeDelta = Vector2.zero;
            m_inlineGraphicRectTransform.anchorMin = Vector2.zero;
            m_inlineGraphicRectTransform.anchorMax = Vector2.one;

            m_TextMeshPro = gameObject.GetComponent<TextMeshPro>();
            m_TextMeshProUI = gameObject.GetComponent<TextMeshProUGUI>();
        }
Ejemplo n.º 15
0
    // Use this for initialization
    void Awake()
    {
        textField = transform.Find("Text").gameObject.GetComponent<UnityEngine.UI.Text>();
        canvRenderer = GetComponent<CanvasRenderer>();
        canvRenderer.SetAlpha(0.0f);

        initCaptions ();
    }
    public void Awake()
    {
        canvas_r = GetComponent<CanvasRenderer>();
        canvas_group = GetComponent<CanvasGroup>();

        if (canvas_group != null) alpha_initial = canvas_group.alpha;
        else alpha_initial = canvas_r.GetAlpha();
    }
Ejemplo n.º 17
0
    // Use this for initialization
    void Start()
    {
        pauseScreen = transform.FindChild("PauseScreen").gameObject.GetComponent<CanvasRenderer>();
        pauseScreen.SetAlpha(0);

        gameOverScreen = transform.FindChild("GameOverScreen").gameObject.GetComponent<CanvasRenderer>();
        gameOverScreen.SetAlpha(0);
    }
 // Use this for initialization
 void Start()
 {
     remainingTime = fadeTime;
     mainTitleImg.enabled = true;
     fishingGirl.enabled = true;
     girlRenderer = fishingGirl.GetComponent<CanvasRenderer>();
     titleRenderer = mainTitleImg.GetComponent<CanvasRenderer>();
 }
Ejemplo n.º 19
0
 public WallFill(Canvas canvas, string name)
 {
     GameObject go = new GameObject(name, typeof(RectTransform));
     go.transform.parent = canvas.transform;
     this.canvasRender = go.AddComponent<CanvasRenderer>();
     wallMaterial = new Material(Shader.Find("UI/Default"));
     vertlist = new List<UIVertex>();
     walls = new List<Wall2D>();
 }
    static public int set_isMask(IntPtr l)
    {
        UnityEngine.CanvasRenderer o = (UnityEngine.CanvasRenderer)checkSelf(l);
        bool v;

        checkType(l, 2, out v);
        o.isMask = v;
        return(0);
    }
Ejemplo n.º 21
0
    //Initialisation
    void Start()
    {
        rend = this.gameObject.GetComponent<CanvasRenderer>();
        canvas = this.gameObject.GetComponent<Canvas>();

        //Get initial colour mode from Game Control
        ChangeColourMode(GameControl.control.currentGameLevel);
        allColours = GameControl.control.currentGameLevel > 3;
    }
Ejemplo n.º 22
0
 /// <summary>
 /// Постепенно отображает объект UI (корутина).
 /// </summary>
 /// <returns>(Корутина).</returns>
 /// <param name="renderer">CanvasRenderer объекта.</param>
 /// <param name="time">Время появления.</param>
 public static IEnumerator FadeIn(CanvasRenderer renderer, float time)
 {
     renderer.SetAlpha(0);
     do
     {
         renderer.SetAlpha(renderer.GetAlpha() + Time.deltaTime / time);
         yield return null;
     }
     while (renderer != null && renderer.GetAlpha() < 1);
 }
Ejemplo n.º 23
0
#pragma warning disable 0618
	void Awake() {
		button = gameObject.GetComponent<UnityEngine.UI.Button>() as UnityEngine.UI.Button;
		buttonRenderer = button.GetComponentInChildren<CanvasRenderer>() as CanvasRenderer;
		text = button.GetComponentInChildren<Text>() as Text;

		// Hide the button		
		button.enabled = false;
		buttonRenderer.SetAlpha(0);
		text.color = Color.clear;
	}
Ejemplo n.º 24
0
 IEnumerator FadeAndDestroyObject(CanvasRenderer renderer, float time)
 {
     float a = renderer.GetAlpha();
     while (renderer.GetAlpha() > 0)
     {
         renderer.SetAlpha(renderer.GetAlpha() - (Time.deltaTime / time) * a);
         yield return null;
     }
     Destroy(gameObject);
 }
Ejemplo n.º 25
0
    // Use this for initialization
    void Start()
    {
        finishedAnim = false;
        initialiseElements = true;

        optionsContainer = GameObject.Find("UI Color Options").GetComponent<RectTransform>();
        UIBox = GameObject.Find("UIBox").GetComponent<CanvasRenderer>();

        UIBox.SetAlpha(0);
    }
Ejemplo n.º 26
0
 // Use this for initialization
 void Start()
 {
     anim = GetComponent<Animator>();
     animators = LinkedObjects.Select(i => i.GetComponent<Animator>()).ToArray();
     canvasRenderer = GetComponent<CanvasRenderer>();
     stateIdle = Animator.StringToHash("Message.Idle");
     text = GetComponent<Text>();
     message = text.text;
     stateGlow = Animator.StringToHash("Photo.Glow");
 }
Ejemplo n.º 27
0
    // Use this for initialization
    void Start()
    {
        finishedAnim = false;
        initialiseElements = true;

        optionsContainer = GameObject.Find("Options").GetComponent<RectTransform>();
        spaceship = GameObject.Find("Spaceship").GetComponent<RectTransform>();

        optionsHelp = GameObject.Find("Options Tutorial").GetComponent<CanvasRenderer>();
        optionsHelp.SetAlpha(0);
    }
Ejemplo n.º 28
0
 static public int DisableRectClipping(IntPtr l)
 {
     try {
         UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l);
         self.DisableRectClipping();
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 29
0
    public override void gaxb_init()
    {
        gameObject = new GameObject ("<Color/>", typeof(RectTransform));

        canvasRenderer = gameObject.AddComponent<CanvasRenderer> ();
        image = gameObject.AddComponent<Image> ();

        if (image && color != null) {
            image.color = color.Value;
        }
    }
Ejemplo n.º 30
0
 static public int Clear(IntPtr l)
 {
     try {
         UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l);
         self.Clear();
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 31
0
 static public int get_popMaterialCount(IntPtr l)
 {
     try {
         UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l);
         pushValue(l, self.popMaterialCount);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 32
0
 static public int get_hasMoved(IntPtr l)
 {
     try {
         UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l);
         pushValue(l, self.hasMoved);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 33
0
 static public int GetAlpha(IntPtr l)
 {
     try {
         UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l);
         var ret = self.GetAlpha();
         pushValue(l, ret);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 34
0
 static public int get_absoluteDepth(IntPtr l)
 {
     try {
         UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l);
         pushValue(l, self.absoluteDepth);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
	static public int constructor(IntPtr l) {
		try {
			UnityEngine.CanvasRenderer o;
			o=new UnityEngine.CanvasRenderer();
			pushValue(l,true);
			pushValue(l,o);
			return 2;
		}
		catch(Exception e) {
			return error(l,e);
		}
	}
 static public int get_hasPopInstruction(IntPtr l)
 {
     try {
         UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.hasPopInstruction);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 37
0
 static public int get_cullTransparentMesh(IntPtr l)
 {
     try {
         UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.cullTransparentMesh);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 38
0
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.CanvasRenderer o;
         o = new UnityEngine.CanvasRenderer();
         pushValue(l, o);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int get_absoluteDepth(IntPtr l)
 {
     try {
         UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.absoluteDepth);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int Clear(IntPtr l)
 {
     try{
         UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l);
         self.Clear();
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
Ejemplo n.º 41
0
 static public int SetMaterial(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         int argc = LuaDLL.lua_gettop(l);
         if (matchType(l, argc, 2, typeof(UnityEngine.Material), typeof(UnityEngine.Texture)))
         {
             UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l);
             UnityEngine.Material       a1;
             checkType(l, 2, out a1);
             UnityEngine.Texture a2;
             checkType(l, 3, out a2);
             self.SetMaterial(a1, a2);
             pushValue(l, true);
             return(1);
         }
         else if (matchType(l, argc, 2, typeof(UnityEngine.Material), typeof(int)))
         {
             UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l);
             UnityEngine.Material       a1;
             checkType(l, 2, out a1);
             System.Int32 a2;
             checkType(l, 3, out a2);
             self.SetMaterial(a1, a2);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function SetMaterial to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
Ejemplo n.º 42
0
 static public int SetAlpha(IntPtr l)
 {
     try {
         UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l);
         System.Single a1;
         checkType(l, 2, out a1);
         self.SetAlpha(a1);
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 43
0
 static public int EnableRectClipping(IntPtr l)
 {
     try {
         UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l);
         UnityEngine.Rect           a1;
         checkValueType(l, 2, out a1);
         self.EnableRectClipping(a1);
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 44
0
 static public int set_cull(IntPtr l)
 {
     try {
         UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l);
         bool v;
         checkType(l, 2, out v);
         self.cull = v;
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 45
0
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.CanvasRenderer o;
         o = new UnityEngine.CanvasRenderer();
         pushValue(l, o);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
 public static int constructor(IntPtr l)
 {
     try {
         UnityEngine.CanvasRenderer o;
         o=new UnityEngine.CanvasRenderer();
         pushValue(l,o);
         return 1;
     }
     catch(Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return 0;
     }
 }
 static public int constructor(IntPtr l)
 {
     LuaDLL.lua_remove(l, 1);
     UnityEngine.CanvasRenderer o;
     if (matchType(l, 1))
     {
         o = new UnityEngine.CanvasRenderer();
         pushObject(l, o);
         return(1);
     }
     LuaDLL.luaL_error(l, "New object failed.");
     return(0);
 }
Ejemplo n.º 48
0
 static public int SetMesh(IntPtr l)
 {
     try {
         UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l);
         UnityEngine.Mesh           a1;
         checkType(l, 2, out a1);
         self.SetMesh(a1);
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int GetAlpha(IntPtr l)
 {
     try{
         UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l);
         System.Single ret = self.GetAlpha();
         pushValue(l, ret);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
Ejemplo n.º 50
0
 static public int set_popMaterialCount(IntPtr l)
 {
     try {
         UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l);
         int v;
         checkType(l, 2, out v);
         self.popMaterialCount = v;
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 51
0
    // Use this for initialization
    void Start()
    {
        startAnim = false;
        startMenuAnim = false;

        optionsContainer = GameObject.Find("Options").GetComponent<RectTransform>();
        spaceship = GameObject.Find("Spaceship").GetComponent<RectTransform>();

        curSquare = GameObject.Find("TopBtn").GetComponent<CanvasRenderer>();

        wtfUnityFloats = false;
        annoying = false;
    }
 static public int set_hasPopInstruction(IntPtr l)
 {
     try {
         UnityEngine.CanvasRenderer self = (UnityEngine.CanvasRenderer)checkSelf(l);
         bool v;
         checkType(l, 2, out v);
         self.hasPopInstruction = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 53
0
        // Use this for initialization
        void Awake()
        {
            m_DungonEntryUI = GameObject.Find("DungonEntryCanvas");
            m_DungonEntryUIRenerer = m_DungonEntryUI.transform.FindChild("DungonEntryBG").GetComponent<CanvasRenderer>();
            m_DungonEntryUIBg = m_DungonEntryUIRenerer.gameObject.GetComponent<Image>();
            m_DungonItemManager = GameObject.Find("DungonEntryCanvas/DungonItemList").GetComponent<DungonItemManager>();

            Button enterBtn =m_DungonEntryUI.transform.FindChild("Enter").GetComponent<Button>();
            enterBtn.onClick.AddListener(OnEnterDungon);
            Button cancelBtn =m_DungonEntryUI.transform.FindChild("Cancel").GetComponent<Button>();
            cancelBtn.onClick.AddListener(OnReturnCity);

            m_DungonEntryUI.SetActive(false);
        }
Ejemplo n.º 54
0
    public static IEnumerator UIColorFade(CanvasRenderer renderer, Color start, Color end, float duration, EaseType easeType, Action callback) {

		float t = 0f;
		while (t < 1f) {
			t += Time.deltaTime * (1f / duration);
			renderer.SetColor (Color.Lerp (start, end, Ease (t, easeType)));
			yield return null;
		}

        if (callback != null)
        {
            callback();
        }
	}
Ejemplo n.º 55
0
    // Use this for initialization
    void Start()
    {
        // Retrieve the canvas and make the button disabled to begin
        canvasRenderer = gameObject.GetComponent<CanvasRenderer>();
        canvasRenderer.SetAlpha(0.25f);

        // Retrieve the menu item's text
        menuItemText = gameObject.GetComponentInChildren<UnityEngine.UI.Text>();
        menuItemText.text = MenuItemText;

        // Override the menu item id for the clear crop
        if (action == UIAction.ClearCrop) {
            MenuItemId = UIAction.ClearCrop.ToString();
        }
    }
Ejemplo n.º 56
0
    public override void gaxb_init()
    {
        gameObject = new GameObject ("<Image/>", typeof(RectTransform));

        canvasRenderer = gameObject.AddComponent<CanvasRenderer> ();
        image = gameObject.AddComponent<Image> ();

        if (color != null) {
            image.color = color.Value;
        }

        if (resourcePath != null) {
            LoadImageWithResourcePath(resourcePath);
        }
    }
Ejemplo n.º 57
0
 void Start()
 {
     arrowHead.sizeDelta = new Vector2 (arrowHead.rect.width * ARROW_HEAD_SCALE_COEFFICIENT, arrowHead.rect.height * ARROW_HEAD_SCALE_COEFFICIENT);
     arrowTail.sizeDelta = new Vector2 (arrowTail.rect.width, arrowTail.rect.height * ARROW_TAIL_SCALE_COEFFICIENT);
     scoreKeepingScript = GameObject.Find ("World").GetComponent<ScoreKeeping> ();
     ballManagerScript = GetComponent<BallManager> ();
     cameraFollowScript = camera3D.GetComponent<CameraFollow> ();
     levelManage = GameObject.Find ("LevelManager");
     levelManagerScript = levelManage == null ? null : levelManage.GetComponent<LevelManager> ();
     arrowTailRenderer = arrowTail.GetComponent<CanvasRenderer> ();
     arrowTailRenderer.SetMaterial (arrowTailShader, null);
     distance = 0;
     arrowScalePercent = 0;
     overUI = false;
 }
Ejemplo n.º 58
0
        public void OnEnable()
        {
            // Get the UI Skin and Styles for the various Editors
            TMP_UIStyleManager.GetUIStyles();

            fontAsset_prop = serializedObject.FindProperty("m_fontAsset");
            spriteAsset_prop = serializedObject.FindProperty("m_spriteAsset");

            m_SubMeshComponent = target as TMP_SubMeshUI;
            //m_rectTransform = m_SubMeshComponent.rectTransform;
            m_canvasRenderer = m_SubMeshComponent.canvasRenderer;

            // Create new Material Editor if one does not exists
            if (m_canvasRenderer != null && m_canvasRenderer.GetMaterial() != null)
            {
                m_materialEditor = Editor.CreateEditor(m_canvasRenderer.GetMaterial());
                m_targetMaterial = m_canvasRenderer.GetMaterial();
            }
        }
        //Drag-n-Drop related properties
        //private Rect m_inspectorStartRegion;
        //private Rect m_inspectorEndRegion;
        public void OnEnable()
        {
            // Get the UI Skin and Styles for the various Editors
            TMP_UIStyleManager.GetUIStyles();

            //fontSharedMaterial_prop = serializedObject.FindProperty("m_sharedMaterial");
            //raycastTarget_prop = serializedObject.FindProperty("m_RaycastTarget");

            m_SubMeshComponent = target as TMP_SubMeshUI;
            //m_rectTransform = m_SubMeshComponent.rectTransform;
            m_canvasRenderer = m_SubMeshComponent.canvasRenderer;

            // Create new Material Editor if one does not exists
            if (m_canvasRenderer != null && m_canvasRenderer.GetMaterial() != null)
            {
                m_materialEditor = Editor.CreateEditor(m_canvasRenderer.GetMaterial());
                m_targetMaterial = m_canvasRenderer.GetMaterial();

                //UnityEditorInternal.InternalEditorUtility.SetIsInspectorExpanded(m_targetMaterial, true);
                //Debug.Log("Currently Assigned Material is " + m_targetMaterial + ".  Font Material is " + m_textMeshProScript.fontSharedMaterial);
            }
        }
Ejemplo n.º 60
0
 public void DrawSprite(UIVertex[] uiVertices, int spriteCount)
 {
     if (m_inlineGraphicCanvasRenderer == null) m_inlineGraphicCanvasRenderer = m_inlineGraphic.GetComponent<CanvasRenderer>();
                
     m_inlineGraphicCanvasRenderer.SetVertices(uiVertices, spriteCount * 4);
     m_inlineGraphic.UpdateMaterial();
     
 }