Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: pakmafia on September 19, 2016, 09:47:59 AM

Title: Need gui buttons
Post by: pakmafia on September 19, 2016, 09:47:59 AM
I have a charecter with various animations that responds to keys such as
Code: [Select]
if(Input.GetKeyDown ("2")){
if(myAnimator.GetInteger ("CurrentAction") == 0){
myAnimator.SetInteger ("CurrentAction", 2);
} else if (myAnimator.GetInteger ("CurrentAction") == 2){
myAnimator.SetInteger ("CurrentAction", 0);
}
so when key 2 is pressed it performs a certain animation

Now i want to use touch buttons instead as i intend to make android game.

what would be the best approach for this?

if i can use send message action? if so what will be the method name from the code above?
Title: Re: Need gui buttons
Post by: djaydino on September 19, 2016, 11:50:33 AM
Hi,
You should get "Ugui Proxy Full" from the Ecossystem (https://hutonggames.fogbugz.com/default.asp?W1181)

And here (https://www.youtube.com/watch?v=KZCtGySZ4AI) is a tutorial video you can watch :)
Title: Re: Need gui buttons
Post by: pakmafia on September 19, 2016, 11:56:25 AM
Thanks i had a quick look at the ecosystem and it looks a very useful tool I will certainly look into it more. but for now i have just edited my c#code instead not using playmaker.
Code: [Select]
if (GUI.Button(new Rect(10, 10, 100, 50), "Punch") || (Input.GetKeyUp("2")))and rest remains the same. cheers