Aego Русский

Scripts

Holds the Aego Script attachments of a node.

component engine.Script
On this page

Try it

Enable a script attachment

The target has a disabled Move On Ready script and stays at the gray mark.

Enable the Move On Ready attachment in the Inspector. The scene restarts, its real Ready method runs and moves the target to the blue mark. Reset disables it again.

Starts the scene; open the example parameters to experiment.
Open in AegoDownload example project
Scene4 nodes
Script target
Transform
position[-2, 0]rotation0scale[1, 1]
Sprite Renderer
spriteTextureasset("ae900000000000000000000000000d00")tintColor#f59e0bffsizeVec2[1.5, 1.5]orderint1
Starting position
Transform
position[-2, 0]rotation0scale[1, 1]
Sprite Renderer
spriteTextureasset("ae900000000000000000000000000010")tintColor#9ca3afffsizeVec2[0.4, 3]
Script destination
Transform
position[2, 0]rotation0scale[1, 1]
Sprite Renderer
spriteTextureasset("ae900000000000000000000000000010")tintColor#38bdf8ffsizeVec2[0.4, 3]
Camera
Transform
position[0, 0]rotation0scale[1, 1]
Camera 2D
zoomfloat40clearColorColor#111827ffscaleenumfitVirtualvirtualVec2[960, 540]activebooltrue
Scriptmain.aes
package demo

// Ready runs only when this actual script attachment is enabled.
script MoveOnReady {
    func Ready() {
        node.SetPosition(Vec2{2, 0})
    }
}