Forum rules - please read before posting.

Rewired script - just a silly question

Found a copy of basic rewired script. It works but I have a small question about it.
It seems the like the following method is called every update and for each input button AC uses.

I assume that is because AC is checking to see if a button was pressed and of course if nothing is going on it checks for every button each update.

 

I was thinking AC would listen for a button down event and then handle, but it seems it checks all the buttons each update.

Is that correct?  

private bool CustomGetButtonDown(string buttonName)  
    {
          //   Debug.Log(buttonName);
  
        return player.GetButtonDown(buttonName);
    }

Comments

  • Yes - the same function is used for all buttons.  While not all buttons are checked for every update, some are - meaning the function itself is run every cycle.
  • Thanks just wanted to make sure that is how it works.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.