Hello,
Here is part of my script:
void Update ()
{
if (!GoRight () || !GoLeft())
{
CharacterMover.Instance.LeftRight = 0;
}
}
public void GoRight ()
{
CharacterMover.Instance.LeftRight = 1;
}
public void GoLeft ()
{
CharacterMover.Instance.LeftRight = -1;
}
My error is at line 3 inside the IF statement.
The two methods “GoLeft” and “GoRight” are connected to a button via OnPointerDown on the Eventsystem. All I want is whenever none of those two functions are being called, the LeftRight float from another script goes to 0.
Any ideas on how to fix this error?
Thank you