TO SQUASH: menu key movement.
This commit is contained in:
@@ -5,7 +5,9 @@ public class MenuButton : MonoBehaviour
|
||||
{
|
||||
public bool isButtonPressed = false;
|
||||
|
||||
public Animator keyAnimator;
|
||||
public MenuKey key;
|
||||
|
||||
public int row;
|
||||
|
||||
private SpriteRenderer spriteRenderer;
|
||||
|
||||
@@ -33,7 +35,7 @@ public class MenuButton : MonoBehaviour
|
||||
if (boxCollider.OverlapPoint(worldMousePosition))
|
||||
{
|
||||
isButtonPressed = true;
|
||||
keyAnimator.SetTrigger("buttonChanged");
|
||||
key.TranslateTo(row);
|
||||
} else {
|
||||
isButtonPressed = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user