public void Awake() { Application.runInBackground = true; inputRecords = new List <InputRecord>(); CurrentRole = RDSRT_Role.Sender; orig_Awake(); }
public new void Update() { if (this.gameState == GameState.PreStart && Input.GetKeyDown(KeyCode.R)) { CurrentRole = CurrentRole == RDSRT_Role.Sender ? RDSRT_Role.Receiver : RDSRT_Role.Sender; HUD.status = String.Format("Current Role: {0}", CurrentRole.ToString()); } if (CurrentRole == RDSRT_Role.Sender) { Utils.CurrentTimePassed(); // to set the time at the start of the frame. // Compare last inputs to these inputs, if they've changed write to the file. P1BitfieldThisFrame = Utils.InputBitfield_P1; P2BitfieldThisFrame = Utils.InputBitfield_P2; // pretty sure this is how we avoid reading cutscene inputs, etc. if (P1BitfieldThisFrame > 0 && this.receptive && !this.paused) { Utils.WriteEvent(Utils.GetCurrentSongName(), Utils.CurrentTimePassed(), 0, P1BitfieldThisFrame); } } orig_Update(); }