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 - mimmog

Pages: 1 2 [3]
31
NGUI 3 Support / Re: What is the best way for to do....
« on: August 23, 2014, 01:37:30 AM »
Aren please help me, there are not video tutorial or documentation for this question.

Thank you

32
NGUI 3 Support / What is the best way for to do....
« on: August 22, 2014, 12:13:09 PM »
I have this situation :
1) First scene where there are some button : play, option, info etc
2) If I click on play button I must go to the worlds choice screen
3) If I click on one world button I must go to levels choice the screen
4) If I click on one level button the game must start

The question is : what is the best way for to do this with NGUI ?
a) 4 scene with 4 ui root and call Application.levelload ?
b) 1 scene with 1 ui root and 4 Panel and enable / disable every panel for change the scene
c) There is another way ?



Thank you

33
NGUI 3 Support / Re: Problem NGUI on android device
« on: August 20, 2014, 06:07:35 PM »

34
NGUI 3 Support / Problem NGUI on android device
« on: August 20, 2014, 04:35:45 PM »
Hi ! I have a problem because my game on pc in android mode work fine but on android device I have many problem with NGUI. Look this video http://youtu.be/9YPuv6lpyaY

The device used is Samsung Note2 with android 4.3 (but I have the same problem also on Samsung Note3 with android 4.4.3 where the game also crash) and NOT on Galaxy S with android 2.3.6 where all works fine!!)

If I disable NGUI the game work fine.....what could be the problem?

Thank you


35
NGUI 3 Support / Re: setActive not reactive the sprite
« on: August 10, 2014, 02:49:09 AM »
GameObject.Find can't find disable objects. Check Unity's documentation, then stop using it.

GameObject.Find should never be used.

http://answers.unity3d.com/questions/52560/gameobjectfind-work-on-inactive-objects.html
I could disable Ngui sprite component instead of the gameobject what do you say as a solution?

36
NGUI 3 Support / setActive not reactive the sprite
« on: August 01, 2014, 04:42:10 AM »
I disable the sprite with this code

  1. NGUITools.SetActive(GameObject.Find("Lives"+numLives)),false);

and I want to reactive it with :

  1. public void restartLevel ()
  2.         {
  3.                 if(Lives<=0){
  4.                         Lives = savedOriginalLives;
  5.                         for(int j=1; j<=savedOriginalLives;j++){
  6.                                 NGUITools.SetActive(GameObject.Find("Lives"+j),true);
  7.                         }
  8.                 }
  9.                 heightScore = false;
  10.                 Time.timeScale = 1;
  11.                 controlMenu = false;
  12.                 setPlayerState(false);
  13.                 Application.LoadLevel(Application.loadedLevel);
  14.         }

Why it not work ??

37
NGUI 3 Support / Re: Display menu after event
« on: July 29, 2014, 03:33:20 PM »
I have used this code but not working....when I click on "Restart Level" button the menu disappear but when the level restart and the player dies again I see that menu disappear again but it must appare !!

This code is attached on "Restart Level" button
  1.  
  2. void Start(){
  3.      tw= gameObject.GetComponent<UIPlayTween>();
  4. }
  5.  
  6. void OnClick(){
  7.         EventDelegate.Add(tw.onFinished,restartTw);
  8.  
  9. }
  10.  
  11. private void restartTw(){
  12.                         if(tw!=null){
  13.                         //Disable menu
  14.                         NGUITools.SetActive(menuDead,false);
  15.                         //Reset all tweens
  16.                         menuDead.GetComponent<TweenWidth>().ResetToBeginning();
  17.                         menuDead.GetComponent<TweenWidth>().enabled = true;
  18.                         menuDead.GetComponent<TweenHeight>().ResetToBeginning();
  19.                         menuDead.GetComponent<TweenHeight>().enabled = true;
  20.                         menuDead.GetComponent<TweenAlpha>().ResetToBeginning();
  21.                         menuDead.GetComponent<TweenAlpha>().enabled = true;
  22.                 }
  23.                        //RestartLevel
  24.                         sm.gameData.restartLevel ();
  25.        
  26. }
  27.  

Why it not work !!! :(

38
NGUI 3 Support / Re: Display menu after event
« on: July 29, 2014, 09:18:27 AM »
Thank you for your answer. If I disable the Panel and then I active it when the player dies all is ok but there is a problem...

The Panel is displayed with a tween animation and contain the button "Restart Level". This button have the script UIPlayTween with option Trigger condition ON CLICK and Play direction REVERSE then when I click the button the Panel disappear and the level is restarted. I want that when the tween reverse is finished the Panel is disabled again and the tween animation must restart from the start (when the Panel is first appeared) because this Menu must be displayed again if the player dies. Is possibile to do that ?

Thank you

39
NGUI 3 Support / Display menu after event
« on: July 28, 2014, 07:42:30 AM »
Good morning, I want to display my menu when the player dies (no when I click a button), I don't understand how can I do this...
My project structure is :

1) Main Camera
2) All level's objects
3) UI Root with child Panel (this is the menu that I want to display) and Camera

Thank you ! 

Pages: 1 2 [3]