public override void SimulateController() { // This should go to a script in PlayerController (NYI)... if (Input.GetKeyDown(KeyCode.F)) { Debug.Log("Colour flashed."); var flash = FlashColourEvent.Create(entity); flash.FlashColour = Color.red; flash.Send(); } }
/* * EVENTS */ // This is literally just an example event from the tutorial. public override void OnEvent(FlashColourEvent evnt) { renderer.material.color = evnt.FlashColour; resetColourTime = Time.time + 0.25f; }