A Canvas placable element that can be used to modify children Alpha, Raycasting, Enabled state.

Inheritance: Component, ICanvasRaycastFilter
Example #1
1
	void Start () {

		mayUseHealth = false;
		mayUseMana = false;

		RectTransform slotRect = GetComponent<RectTransform> (); 
		RectTransform txtRect = stackTxt.GetComponent<RectTransform> (); 

		int txtScaleFactor = (int)(slotRect.sizeDelta.x * 0.55); 

		stackTxt.resizeTextMaxSize = txtScaleFactor; 
		stackTxt.resizeTextMinSize = txtScaleFactor; 

		txtRect.SetSizeWithCurrentAnchors (RectTransform.Axis.Horizontal, slotRect.sizeDelta.x); 
		txtRect.SetSizeWithCurrentAnchors (RectTransform.Axis.Vertical, slotRect.sizeDelta.y);

        if (transform.parent != null) {

            if (itemGroup == null) {
                itemGroup = transform.parent.GetComponent<CanvasGroup>();
            }
            EventTrigger trigger = GetComponentInParent<EventTrigger>();
            EventTrigger.Entry entry = new EventTrigger.Entry();
            entry.eventID = EventTriggerType.PointerEnter;
            entry.callback.AddListener((eventData) => { transform.parent.GetComponent<Inventory>().ShowToolTip(gameObject); });
            trigger.triggers.Add(entry);
        }
    }
	void Awake () {
		// get elements
		panel = transform.GetComponent<CanvasGroup> ();
		// bind events
		_dispatcher.AddListener ("fade_in_screen", fadeIn);
		_dispatcher.AddListener ("fade_out_screen", fadeOut);
	}
 private void Awake()
 {
     _canvasGroup = GetComponent<CanvasGroup>();
     // Start faded out
     _canvasGroup.alpha = 0f;
     _keepOpenTimer = _fadeOutDelay;
 }
Example #4
0
    public static void CallLoading(ModalPanel modalPanel, CanvasGroup canvasGroup, string messageText, UnityAction callback)
    {
        ShowModal (modalPanel, canvasGroup);

        modalPanel.loadingPanel.gameObject.SetActive (true);
        modalPanel.loadingPanel.Show (messageText, callback);
    }
Example #5
0
 void Start()
 {
     minimap = GetComponent<RectTransform>();
     minimapGroup = GetComponent<CanvasGroup>();
     parentTransform = transform.parent.GetComponent<RectTransform>();
     eventer.OnPlayerJoined += OnPlayerJoined;
 }
Example #6
0
    public static void CallAlert(ModalPanel modalPanel, CanvasGroup canvasGroup, string alertText, string buttonText, UnityAction callback)
    {
        ShowModal (modalPanel, canvasGroup);

        modalPanel.alertPanel.gameObject.SetActive (true);
        modalPanel.alertPanel.Show (alertText, buttonText, callback);
    }
    void Start()
    {
        canvasGroup = (CanvasGroup)GetComponent(typeof(CanvasGroup));

        canvasGroup.alpha = 0.0f;

        fadeInStartTime = Time.unscaledTime;

        if (wastedClip != null)
            AudioCenter.PlayClipAtMainCamera(wastedClip);

        int newScore = (SceneObjects.Get().game.levelNumber - 1);

        resultTextView.text = "Сожжено волн: " + newScore;

        SceneObjects so = SceneObjects.Get();
        ScoreController sc = so.score;
        int maxScore = sc.maxScore;

        bestResultTextView.text = "Ваш прошлый рекорд: " + maxScore;

        Camera.main.GetComponent<AudioSource>().clip = null;

        SceneObjects.Get().score.AddScore(newScore);
    }
 void Awake()
 {
     m_Rect = transform as RectTransform;
     m_group = GetComponent<CanvasGroup>();
     m_text = GetComponentInChildren<Text>();
     m_clickImage = GetComponentInChildren<Image>();
 }
    void Start()
    {
        instance = this;
        infoBar = GetComponent<CanvasGroup>();

        MWM_CMS_DatabaseManager.instance.apartmentManager.SelectedApartmentAction += HandleSelectedApartment;
    }
Example #10
0
 static public int constructor(IntPtr l)
 {
     UnityEngine.CanvasGroup o;
     o = new UnityEngine.CanvasGroup();
     pushObject(l, o);
     return(1);
 }
Example #11
0
    void Update()
    {
        if (background == null)
        {
            background = GameObject.Find("Background").GetComponent<Image>();
        }
        if (storyImage == null)
        {
            storyImage = GameObject.Find("StoryImage").GetComponent<Image>();
        }
        if (storyText == null)
        {
            storyText = GameObject.Find("StoryText").GetComponent<Text>();
        }
        if (pauseMenu == null)
        {
            pauseMenu = GameObject.Find("PauseMenu").GetComponent<CanvasGroup>();
        }



        if (activeState != null)
        {
            activeState.StateUpdate();
        }
    }
Example #12
0
 void Start()
 {
     _debugUI = GameObject.Find("DebugUI").GetComponent<DebugUI>();
     _text = gameObject.GetComponent<Text>();
     _canvasGroup = gameObject.GetComponent<CanvasGroup> ();
     _baseAlpha = 1f;
 }
Example #13
0
    void Awake()
    {
        if (UI_Manager == null)
        {
            UI_Manager = this;
            
            DontDestroyOnLoad(gameObject);            
        }
        else if (UI_Manager != null)
        {
            Destroy(gameObject);
        }        

        _titleScreenAnim = titleScreen.GetComponent<Animator>();
        _soundScreenAnim = soundScreen.GetComponent<Animator>();
        _pauseScreenAnim = pauseScreen.GetComponent<Animator>();
        _loseScreenAnim = loseScreen.GetComponent<Animator>();
        _fadeScreenAnim = fadeScreen.GetComponent<Animator>();
        _oFScreenAnim = overlayFadeScreen.GetComponent<Animator>();

        _titleCanvas = titleScreen.GetComponent<CanvasGroup>();
        _pauseCanvas = pauseScreen.GetComponent<CanvasGroup>();
        _loseCanvas = loseScreen.GetComponent<CanvasGroup>();

        _source = GetComponent<AudioSource>();        

        Setup();
    }
Example #14
0
    // Use this for initialization
    void Start()
    {
        group = GetComponent<CanvasGroup>();

        ManageGame.onEndGame+=HideUI;
        ManageGame.onStartGame+=ShowUI;
    }
Example #15
0
 void Awake()
 {
     PlayerPrefs.SetFloat("Difficulty", FindObjectOfType<Slider>().value);
     PlayerPrefs.SetInt("KilledBacterias", 0);
     _confirmQuitCanvasGroup = GameObject.Find("QuitPanel").GetComponent<CanvasGroup>();
     _uiCanvasGroup = GameObject.Find("MainMenu").GetComponent<CanvasGroup>();
 }
    // Use this for initialization
    void Start()
    {
        instance = this;

        canvasGroup = GetComponent<CanvasGroup>();
        ApartmentManager.instance.FilterApartmentsAction +=	 HandleFilterApartmentsAction;
    }
Example #17
0
 public UiAnimationFade(GameObject gameobject, float duration, FadeType fadeType) : base(gameobject)
 {
     Canvas = gameobject.GetOrAddComponent<CanvasGroup>();
     Canvas.alpha = fadeType == FadeType.In ? 0f : Canvas.alpha;
     Duration = duration;
     Fade = fadeType;
 }
Example #18
0
 //private PlayerController player;
 void Start()
 {
     //player = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerController>();
     visibility = GetComponent<CanvasGroup>();
     visibility.alpha = 0;
     StartCoroutine( showUI());
 }
	void Awake () {
		// get elements
		panel = transform.GetComponent<CanvasGroup> ();
		// bind events
		_dispatcher.AddListener ("loading_interstitial_open", open);
		_dispatcher.AddListener ("loading_interstitial_close", close);
	}
 void Awake()
 {
     Transform canvas = transform.Find("Canvas");
     Group = canvas.GetComponent<CanvasGroup>();
     Text = canvas.Find("Text").GetComponent<Text>();
     Rigidbody = GetComponent<Rigidbody2D>();
 }
	void Awake() {
		// get components
		canvas = transform.GetComponent<CanvasGroup> ();
		// bind events
		_dispatcher.AddListener ("close_new_game_panel", hide);
		_dispatcher.AddListener ("open_new_game_panel", show);
	}
Example #22
0
 void Start()
 {
     button = GetComponent<UnityEngine.UI.Button>();
     text = GetComponentInChildren<Text>();
     canvasGroup = GetComponent<CanvasGroup>();
     normalGlow = glow.color;
 }
Example #23
0
    // Use this for initialization
    void Awake()
    {
        UIscript = refInterface.GetComponent<UI_Scripting>();

        continueGroup = transform.Find("TOBECONTINUED").gameObject.GetComponent<CanvasGroup>();
        thanksGroup = transform.Find("THANKSFORPLAYING").gameObject.GetComponent<CanvasGroup>();
    }
	void Start () { 

		botones = new Button[4];
		botones [0] = jugar;
		botones [1] = instru;
		botones [2] = salir;
		botones [3] = puntuaciones;

		c = cc;
		Asprite = new Sprite[9];
		Asprite[0]=D1; 
		Asprite[1]=D2; 
		Asprite[2]=D3; 
		Asprite[3]=H1;
		Asprite[4]=H2;
		Asprite[5]=H3;
		Asprite[6]=H4;
		Asprite[7]=C1;
		Asprite[8]=C2; 
		spriteRenderer = GetComponent<SpriteRenderer>(); 
		nSprite = 0;

		if (spriteRenderer.sprite == null) 
			spriteRenderer.sprite = Asprite[nSprite]; 
		// set the sprite to sprite1 
		
	}
Example #25
0
	public void Awake(){
		_animator = GetComponent<Animator> ();
		_canvasGroup = GetComponent<CanvasGroup> ();

		var rect = GetComponent<RectTransform> ();
		rect.offsetMax = rect.offsetMin = new Vector2 (0, 0);
	}
    // Use this for initialization
    void Start()
    {
        ani = GetComponent<Animator>();
        cgroup = GetComponentInChildren<CanvasGroup>();

        //Reset canvas position to screen center
        RectTransform rect = GetComponent<RectTransform>();
        rect.offsetMax = Vector2.zero;
        rect.offsetMin = Vector2.zero;

        infield = GetComponentInChildren<InputField>();
        startTxt = infield.text;

        playername = PlayerPrefs.GetString("PlayerName", "");

        if (playername == "")
        {
            shouldOpen = true;
        }
        else
        {
            shouldOpen = false;
        }
        StartCoroutine(checkDelay());
    }
    private IEnumerator FadeToGroupCoroutine(CanvasGroup group, float duration)
    {
        // Prevent interaction with the first group.
        currentGroup.interactable = false;

        // Activate the next Group.
        group.gameObject.SetActive(true);

        float t = 0f;
        while (t < duration)
        {
            // Increase t in real time.
            t += Time.unscaledDeltaTime;

            // Fade current group out.
            currentGroup.alpha = Mathf.SmoothStep (1f, 0f, t);

            // Fade new group in.
            group.alpha = Mathf.SmoothStep (0f, 1f, t);

            yield return new WaitForEndOfFrame();
        }

        // Update previous and current Group tracking variables.
        previousGroup = currentGroup;
        currentGroup = group;

        // Deactivate the last Group.
        previousGroup.gameObject.SetActive(false);

        //Enable interaction.
        currentGroup.interactable = true;
    }
    public void BringToForefront(CanvasGroup panel)
    {
        panel.transform.SetAsLastSibling();

        panel.DOKill();
        panel.DOFade(1.0f, this.FadeInDuration).SetEase(this.FadeEase);
    }
Example #29
0
    void OnEnable()
    {
        _canvasGroup = GetComponent<CanvasGroup>();
        _image = GetComponent<Image>();

        LateUpdate();
    }
 public void ShowPanel(CanvasGroup panel)
 {
     HideAll();
     panel.alpha = 1;
     panel.interactable = true;
     panel.blocksRaycasts = true;
 }
Example #31
0
 void Start()
 {
     renderer = GetComponent<CanvasGroup> ();
     renderer.alpha = 0;
     isShown = false;
     isAnimating = false;
 }
    static public int set_alpha(IntPtr l)
    {
        UnityEngine.CanvasGroup o = (UnityEngine.CanvasGroup)checkSelf(l);
        float v;

        checkType(l, 2, out v);
        o.alpha = v;
        return(0);
    }
    static public int set_blocksRaycasts(IntPtr l)
    {
        UnityEngine.CanvasGroup o = (UnityEngine.CanvasGroup)checkSelf(l);
        bool v;

        checkType(l, 2, out v);
        o.blocksRaycasts = v;
        return(0);
    }
    static public int set_ignoreParentGroups(IntPtr l)
    {
        UnityEngine.CanvasGroup o = (UnityEngine.CanvasGroup)checkSelf(l);
        bool v;

        checkType(l, 2, out v);
        o.ignoreParentGroups = v;
        return(0);
    }
    static public int set_interactable(IntPtr l)
    {
        UnityEngine.CanvasGroup o = (UnityEngine.CanvasGroup)checkSelf(l);
        bool v;

        checkType(l, 2, out v);
        o.interactable = v;
        return(0);
    }
 static public int get_blocksRaycasts(IntPtr l)
 {
     try {
         UnityEngine.CanvasGroup self = (UnityEngine.CanvasGroup)checkSelf(l);
         pushValue(l, self.blocksRaycasts);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int get_interactable(IntPtr l)
 {
     try {
         UnityEngine.CanvasGroup self = (UnityEngine.CanvasGroup)checkSelf(l);
         pushValue(l, self.interactable);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int get_alpha(IntPtr l)
 {
     try {
         UnityEngine.CanvasGroup self = (UnityEngine.CanvasGroup)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.alpha);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.CanvasGroup o;
         o = new UnityEngine.CanvasGroup();
         pushValue(l, o);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #40
0
 static public int get_alpha(IntPtr l)
 {
     try {
         UnityEngine.CanvasGroup self = (UnityEngine.CanvasGroup)checkSelf(l);
         pushValue(l, self.alpha);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
Example #41
0
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.CanvasGroup o;
         o = new UnityEngine.CanvasGroup();
         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.CanvasGroup o;
     if (matchType(l, 1))
     {
         o = new UnityEngine.CanvasGroup();
         pushObject(l, o);
         return(1);
     }
     LuaDLL.luaL_error(l, "New object failed.");
     return(0);
 }
 static public int set_blocksRaycasts(IntPtr l)
 {
     try {
         UnityEngine.CanvasGroup self = (UnityEngine.CanvasGroup)checkSelf(l);
         bool v;
         checkType(l, 2, out v);
         self.blocksRaycasts = v;
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_alpha(IntPtr l)
 {
     try {
         UnityEngine.CanvasGroup self = (UnityEngine.CanvasGroup)checkSelf(l);
         float v;
         checkType(l, 2, out v);
         self.alpha = v;
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_interactable(IntPtr l)
 {
     try {
         UnityEngine.CanvasGroup self = (UnityEngine.CanvasGroup)checkSelf(l);
         bool v;
         checkType(l, 2, out v);
         self.interactable = v;
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #46
0
 static public int set_ignoreParentGroups(IntPtr l)
 {
     try {
         UnityEngine.CanvasGroup self = (UnityEngine.CanvasGroup)checkSelf(l);
         bool v;
         checkType(l, 2, out v);
         self.ignoreParentGroups = v;
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
Example #47
0
 static public int set_ignoreParentGroups(IntPtr l)
 {
     try {
         UnityEngine.CanvasGroup self = (UnityEngine.CanvasGroup)checkSelf(l);
         bool v;
         checkType(l, 2, out v);
         self.ignoreParentGroups = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 protected override void Init()
 {
     if (null == m_target)
     {
         return;
     }
     // end if
     m_CanvasGroup = m_target.GetComponent <UnityEngine.CanvasGroup>();
     if (null == m_CanvasGroup)
     {
         return;
     }
     // end if
     m_beginAlpha = m_CanvasGroup.alpha;
 }
Example #49
0
        private void UpdateBottomPanel(bool animated, float delay, Ease easing, float bottomMargin = 0, float animDuration = 0.6f)
        {
            float botPanelYPos = 0;
            float bgYScale     = 1.05f;
            float moreBTNAlpha = botPanelState == Visibility.Fullscreen ? 0 : 1f;

            if (botPanelState == Visibility.Mini)
            {
                botPanelYPos = botPanelDefaultHeight - bottomMargin;
                bgYScale     = 1f;
            }
            else if (botPanelState == Visibility.Hidden)
            {
                botPanelYPos = -botPanelRect.sizeDelta.y;
                bgYScale     = 1f;
            }

            if (botPanelState == Visibility.Fullscreen)
            {
                setScrollRectToTop();
            }

            UnityEngine.CanvasGroup moreBTNCanvasGroup = moreButton.GetComponentInChildren <UnityEngine.CanvasGroup>();
            moreButton.interactable = botPanelState == Visibility.Mini;
            if (!animated)
            {
                Vector3 pos = botPanelRect.anchoredPosition3D;
                pos.y = botPanelYPos;
                botPanelRect.anchoredPosition3D = pos;
                whiteBGRect.localScale          = new Vector3(1f, bgYScale, 1f);
                moreBTNCanvasGroup.alpha        = moreBTNAlpha;
            }
            else
            {
                if (delay > 0)
                {
                    moreBTNCanvasGroup.DOFade(moreBTNAlpha, animDuration).SetDelay(delay);
                    botPanelRect.DOAnchorPos3DY(botPanelYPos, animDuration).SetEase(easing).SetDelay(delay);
                    whiteBGRect.DOScaleY(bgYScale, animDuration).SetEase(easing).SetDelay(delay);
                }
                else
                {
                    moreBTNCanvasGroup.DOFade(moreBTNAlpha, animDuration);
                    botPanelRect.DOAnchorPos3DY(botPanelYPos, animDuration).SetEase(easing);
                    whiteBGRect.DOScaleY(bgYScale, animDuration).SetEase(easing);
                }
            }
        }
 static public int IsRaycastLocationValid(IntPtr l)
 {
     try {
         UnityEngine.CanvasGroup self = (UnityEngine.CanvasGroup)checkSelf(l);
         UnityEngine.Vector2     a1;
         checkType(l, 2, out a1);
         UnityEngine.Camera a2;
         checkType(l, 3, out a2);
         var ret = self.IsRaycastLocationValid(a1, a2);
         pushValue(l, ret);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #51
0
 static int QPYX_IsRaycastLocationValid_YXQP(IntPtr L_YXQP)
 {
     try
     {
         ToLua.CheckArgsCount(L_YXQP, 3);
         UnityEngine.CanvasGroup QPYX_obj_YXQP  = (UnityEngine.CanvasGroup)ToLua.CheckObject(L_YXQP, 1, typeof(UnityEngine.CanvasGroup));
         UnityEngine.Vector2     QPYX_arg0_YXQP = ToLua.ToVector2(L_YXQP, 2);
         UnityEngine.Camera      QPYX_arg1_YXQP = (UnityEngine.Camera)ToLua.CheckObject(L_YXQP, 3, typeof(UnityEngine.Camera));
         bool QPYX_o_YXQP = QPYX_obj_YXQP.IsRaycastLocationValid(QPYX_arg0_YXQP, QPYX_arg1_YXQP);
         LuaDLL.lua_pushboolean(L_YXQP, QPYX_o_YXQP);
         return(1);
     }
     catch (Exception e_YXQP)                {
         return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
     }
 }
Example #52
0
 static int QPYX_DOFade_YXQP(IntPtr L_YXQP)
 {
     try
     {
         ToLua.CheckArgsCount(L_YXQP, 3);
         UnityEngine.CanvasGroup QPYX_obj_YXQP = (UnityEngine.CanvasGroup)ToLua.CheckObject(L_YXQP, 1, typeof(UnityEngine.CanvasGroup));
         float QPYX_arg0_YXQP            = (float)LuaDLL.luaL_checknumber(L_YXQP, 2);
         float QPYX_arg1_YXQP            = (float)LuaDLL.luaL_checknumber(L_YXQP, 3);
         DG.Tweening.Tweener QPYX_o_YXQP = QPYX_obj_YXQP.DOFade(QPYX_arg0_YXQP, QPYX_arg1_YXQP);
         ToLua.PushObject(L_YXQP, QPYX_o_YXQP);
         return(1);
     }
     catch (Exception e_YXQP)                {
         return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
     }
 }
    static int get_alpha(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.CanvasGroup obj = (UnityEngine.CanvasGroup)o;
            float ret = obj.alpha;
            LuaDLL.lua_pushnumber(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index alpha on a nil value"));
        }
    }
 static int IsRaycastLocationValid(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         UnityEngine.CanvasGroup obj  = (UnityEngine.CanvasGroup)ToLua.CheckObject(L, 1, typeof(UnityEngine.CanvasGroup));
         UnityEngine.Vector2     arg0 = ToLua.ToVector2(L, 2);
         UnityEngine.Camera      arg1 = (UnityEngine.Camera)ToLua.CheckObject(L, 3, typeof(UnityEngine.Camera));
         bool o = obj.IsRaycastLocationValid(arg0, arg1);
         LuaDLL.lua_pushboolean(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
    static int set_ignoreParentGroups(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.CanvasGroup obj = (UnityEngine.CanvasGroup)o;
            bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
            obj.ignoreParentGroups = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index ignoreParentGroups on a nil value"));
        }
    }
    static int set_alpha(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.CanvasGroup obj = (UnityEngine.CanvasGroup)o;
            float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
            obj.alpha = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index alpha on a nil value"));
        }
    }
    static int get_ignoreParentGroups(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.CanvasGroup obj = (UnityEngine.CanvasGroup)o;
            bool ret = obj.ignoreParentGroups;
            LuaDLL.lua_pushboolean(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index ignoreParentGroups on a nil value"));
        }
    }
Example #58
0
 static int DOFade(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         UnityEngine.CanvasGroup obj = (UnityEngine.CanvasGroup)ToLua.CheckObject(L, 1, typeof(UnityEngine.CanvasGroup));
         float arg0            = (float)LuaDLL.luaL_checknumber(L, 2);
         float arg1            = (float)LuaDLL.luaL_checknumber(L, 3);
         DG.Tweening.Tweener o = obj.DOFade(arg0, arg1);
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Example #59
0
    static int set_blocksRaycasts(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.CanvasGroup obj = (UnityEngine.CanvasGroup)o;
            bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
            obj.blocksRaycasts = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index blocksRaycasts on a nil value" : e.Message));
        }
    }
Example #60
0
    static int get_blocksRaycasts(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.CanvasGroup obj = (UnityEngine.CanvasGroup)o;
            bool ret = obj.blocksRaycasts;
            LuaDLL.lua_pushboolean(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index blocksRaycasts on a nil value" : e.Message));
        }
    }