Source Academy Modules
    Preparing search index...

    Function update_color

    • Updates the color of the GameObject. Note that the value is modulo 256, so passing values greater than 255 is allowed.

      Parameters

      • gameObject: GameObject

        GameObject reference

      • color: ColorRGBA

        The color as an RGBA array, with RGBA values ranging from 0 to 255.

      Returns GameObject

      the GameObject reference passed in

      update_color(create_rectangle(100, 100), [255, 0, 0, 255]);