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

Pages: [1]
1
when a player press a button he will run for a particular time at a faster rate and till that time the progress bar will reduce gradually from say value 1 to 0.75 . 

what i did is sudden change of progressbar from say 1 to 0.75 but this is some thing which I dont want.

I want a code for progressbar which will gradually decrease the progresss bar from a value say 1 to 0.75 in a time "t"...

thanks

2
NGUI 3 Support / UIslider value gradually changes from one to other
« on: June 25, 2015, 07:22:37 AM »
I want to show the remaining time using a UIprogress bar.  I am not able to make foreground sprite gradually reduce. when i change the value of UISlider the foreground sprite suddenly reduces, but i want it to reduce gradually not suddenly from one value to other....

please tell me how can i achive it.

thanks

3
Thanks a lot Arcanor finally it worked for me....Thanks a ton bro... :)

4
Thanks Arcanor for your help but after assigning the gameobject(with a script) to the notify option, in drop down I am not getting the list of my functions or anything, How can i assign a particular function in the script to that button from drop down. I put the line "EventDelegate.Add(button.onClick, funshop); " in the start function of the script than I got errrors. So  please tell me what changes I have to made in my script so that I can get a list of functions in drop down. Thanks a lot for the help..

5
thank you ArenMook for  replying but i am not good in programig so not able to understand what you said. Still I dont know how to run a particular function in an script which is attached to another gameobject when a particular buttons is clicked..

I have an empty gameobject to which i attached a script which have many functions, each function is for a particular task and there are different buttons for each task. Please tell in steps how to run a particular function when a particular button is clicked..Sorry for the trouble :-[  and thanks a lot for your help :).

6
Hello Everyone, I want to know how can we call a function in other script when a NGUI button is clicked. I older version I do this by using "button message" (assigning a  gameobject and name the function which I want to run with the click of that particular button ) but now with "event trigger" how to do that please tell..
Thanks.

7
NGUI 3 Support / how to change the sprite of a button when it is clicked
« on: December 15, 2013, 02:54:44 PM »
Hello everyone....please tell me how can we change the sprite of a button when it is clicked. how to toggle between 2 sprites when ever the button is clicked....thanks

8
Actually this is my script(java script)...I want that the slider foreground sprite changes its color to red when player health decreases...I dont know csharp so please tell what modification should I do in my javascript...please tell sir what is the easy way also....thhanks for your support sir..

 
  1. private var healthmy : int = 10;
  2.  
  3.  
  4.  function healthmyfun () {  // called when player is hit
  5.  
  6.     if (healthmy >=4) {
  7.        healthmy -- ;
  8.        GameObject.Find("Slider").GetComponent(UISlider).value = healthmy*0.1;// the slider can only take value of 0.1,0.2,0.3 to 1
  9.        //Debug.Log("Plarer is hit and player health is :"+ healthmy );
  10.        }
  11.      ///*
  12.      if (healthmy < 4 && healthmy >=1) {
  13.        healthmy -- ;
  14.        //mSlider.foregroundWidget.color = (mSlider.value < 0.2f) ? Color.red : Color.green; // what code should I use here
  15.        //GameObject.Find("Slider").GetComponent(UISliderColors).colors[]= Color[0];
  16.        //Debug.Log("Plarer is hit and player health is :"+ healthmy );
  17.        }
  18.        //*/
  19.    
  20.     else {
  21.        Debug.Log("Plarer is dead"); //should put code to instantitae particel effect
  22.        }
  23.        
  24.        }
  25.  
  26.    

9
Hello everyone...I want to change the color of the slider foreground sprite when the health of the player reaches to a minimum level using UISpriteColors.cs script...Please tell me how to achieve this..Thanks

Pages: [1]