Someone please help me with combination lock
Player enterring to trigger and canvas actvated, and i need entering 4 number to "open the door". So i make 4 canvas with ten numbers, them i tapped on button this keypad makes don`t visible and next makes visible, when I enterring 4 keypad, i need to press ok. And on screen must visible label "wrong" or "correct" password it work(example of code)
public void checkcode() //attached to button
{
if(a == 1)
{
if(b == 2)
{
if(c == 3)
{
if(d == 4)
{
//when code correct
}
}
}
}
if(a != 1)
{
if(b != 2)
{
if(c != 3)
{
if(d != 4)
{
//when code wrong
}
}
}
}
}
variable takes the value of Button (UI)
` public void but6() //pulic func be attched to button
{
keys1.enabled = false;
keys2.enabled = true;
a = 6; //value of varible
}`
I would like to then i press some button i can see which button i press previously. For example i press three buttons and can see which, first is 1, second 2 etc. How i can in. I need only creating 4 rows of 10 numbers, and manage it on script, or something other way plz with using C#
Comment