Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - yo_milo

Pages: 1 2 [3]
31
NGUI 3 Support / Re: [solved] UISounds overlapping
« on: October 13, 2014, 05:27:54 PM »
Competitive... I gotta put my skills to the test...

32
NGUI 3 Support / Re: UISounds overlapping
« on: August 20, 2014, 05:24:05 PM »
I figured I would have to do this... Well, worth the shot... :) Thanks Aren...

By the way... Do you want to play a match of Starlink sometime?

33
NGUI 3 Support / [solved] UISounds overlapping
« on: August 19, 2014, 05:32:18 PM »
Hello...

I have this problem, that, when I spam clicking a button, the sounds it produces overlap; this is very annoying because I have sounds that are up to 4 seconds long.

I was looking through the code, and I realized that at the end, UIPlayButton calls NGUITools.PlaySound(), and it does a PlayOneShot(Audioclip, volume).
If I want to fix this sound spamming problem, what approach would you recommend me? (or would you do it?)


Because, one thing I could do, is instead of using the NGUI's scripts, I could just have a "Sound manager" with an Audiosource, and just check if the Audiosource is not playing, and if it not, it can play a new sound... But I was hoping there was a "NGUI" based solution for my problem, because otherwise I would have to restructure a few things...

As I told you, I know a few ways around it, but Ideally, It would love you have an NGUI based solution...

34
NGUI 3 Support / Re: Problem drag components
« on: August 14, 2014, 07:42:19 PM »
Thanks

35
NGUI 3 Support / Re: On MouseDown and Up
« on: August 07, 2014, 05:56:21 PM »
Hey Bro.

First, in order for NGUI to detect your 3D object events, the 3D camera must have UICamera Script.
There are several ways you can do this (Please, anyone correct me if I get something wrong).

If you want to make it through code, you can use the OnPress (bool isDown), as seen in the UICamera thread -> http://www.tasharen.com/forum/index.php?topic=6711.0 .

Then, you can write your code as:

void OnPress(bool isDown)
{
if(isDown)
//tween
else
//tween back
}

But it seems like a better idea to attach a TriggerEvent.
Add a deactivated tween to your cube, then add an EventTrigger, OnPress notify TweenRotation/PlayForward, and onRelease, notify TweenRotation/PlayReverse.

Hope that helps.

36
NGUI 3 Support / [solved]Problem drag components
« on: August 07, 2014, 01:46:09 PM »
Hey, Hello.

I do not usually post here... But recently, I wanted to use the Drag components from NGUI, and they do not seem to work properly for me.

At first, I just created a Sprite, added a box collider, and slapped in UIDragObject, and tried it out.

If I have Keep Visible off, it behaves properly; however, if I turn on Keep Visible, and specify the container with an invisible widget (Or anything for that matters), it constraints my movement per click to:
x +- 134, Y +- 103

However, I can still click again, and move it multiple times, and go outside of bounds, with no restrictions.



I wanted to keep the sprite in the screen bounds, and I thought it would be possible to do in NGUI without having to write any scripts.


Problem 2:
Also, once you guys are here (I do not know if I should do a second thread for this other problem, but it is kind of related)

I was looking at the video tutorials because, I thought maybe I was doing something wrong, and I did not want to be hasty asking a question before researching... And while doing the scroll view, dragging my Sprite worked perfectly. But when I turned on Smooth Tween in the Grid Component, my dragging stopped working correctly, as if it was pulling while I was dragging, instead of pulling when I stopped dragging...

Anyone knows how to solve this too?

EDIT:

I solved problem number two, I was missing the drag and drop root on the other Panel.



Pages: 1 2 [3]