The character is at the store, I want to press E to buy ninja stars, and it subtracts 10 from “money” variable, and also adds 5 to the “stars” variable. How do I code this?
if (Input.GetKeyDown( KeyCode.E))
{
money = money - 10;
stars = stars + 5;
}
1 Like