gaLog(string)

Syntax

gaLog(string)

Example

phi = 0

function update()
    phi += ofRandom(3)

    if phi > 360 then
        phi = 0
    end
end

function draw()
    gaBackground(0.0,1.0)

    ofSetColor(255)
    
    ofPushMatrix()
    ofTranslate(OUTPUT_W/2,OUTPUT_H/2,0)
    ofRotate(phi)
    // draw a line with an arrow
    ofLine(-300,0,300,0)
    ofLine(280,-10,300,0)
    ofLine(280,10,300,0)
    ofPopMatrix()
 
    // mark the starting point
    ofPushMatrix()
    ofTranslate(OUTPUT_W/2,OUTPUT_H/2,0)
    ofSetColor(255,0,0)
    text = "--> START HERE (0 Degrees)"
    ofDrawBitmapString(text,320,0)
    ofPopMatrix()

    // print the rotation angle into the GAmuza console
    info = string.format("Rotation Angle: %d degrees",phi)
    gaLog(tostring(info))
end

Description

The gaLog function print text messages on the GAmuza console. The console is located below the script editor.

Parameters

string