Question by
PrinceShalan · Jan 06, 2017 at 11:47 AM ·
if-statements
How to use the button to call for a method
I have a text game and use the canvas and text to write the whole story . the problem is that i know how to call methods by keycodes of the keyboard enter code herefor example ;
text.text = "Your name is Moha and you want to ask for a cup of milk "+
"from one of the neighbours .However, you are looking for one of your relatives+
"so that you would be guranteed that you will have your cup, you are now in the lift " +
"starting looking for your relatives in each floor\n\n" +
"Press G to go up" ;
if(Input.GetKeyDown(KeyCode.G)) {level = Levels.one;}
so I use the if statement to call for a method by using enum . I want to build the game in android so i need to use the buttons the best way in order to script Inputs in the game .
Comment
Your answer
Follow this Question
Related Questions
The bool activates and deactivates but the script in the if statement doesn´t work 1 Answer
Why does my if statement skip the body even when the response is true? 1 Answer
Enumaration error CS1025: Single-line comment or end-of-line expected 1 Answer
AudioSource in Update 1 Answer
Project Spark to C# - Started To, While, and No Longer 1 Answer