Exemple #1
0
    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();
        }
    }
Exemple #2
0
    /*
     * 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;
    }