mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-04 11:35:06 +03:00
24 lines
530 B
Plaintext
24 lines
530 B
Plaintext
import "Scripts/Engine" for Engine
|
|
import "Scripts/Scene" for Scene, Entity
|
|
|
|
class Test {
|
|
construct new() {}
|
|
|
|
init() {
|
|
System.print("hello init")
|
|
}
|
|
|
|
// Gets called on the click event.
|
|
static hello() {
|
|
// Get the entity named Light
|
|
var entity = Scene.GetEntity("Light")
|
|
|
|
// Get the component light
|
|
var light = entity.GetComponent("Light")
|
|
//light.SetIntensity(222.0) // Change intensity
|
|
|
|
var currentIntensity = light.GetIntensity() // Get new intensity
|
|
Engine.Log("Current intensity %(currentIntensity)")
|
|
}
|
|
}
|