You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
439 B
GDScript
20 lines
439 B
GDScript
1 year ago
|
extends Spatial
|
||
|
|
||
|
|
||
|
onready var exhaust_node = $Exhaust;
|
||
|
|
||
|
var exhausts = ["Exhaust", "Exhaust2", "Exhaust3", "Exhaust4"]
|
||
|
|
||
|
func change_engine_power(power):
|
||
|
var MAX_POWER = 10;
|
||
|
print("Changing missile exhaust to: ", power);
|
||
|
for e in exhausts:
|
||
|
var node: MeshInstance = exhaust_node.get_node("./"+e);
|
||
|
node.get_active_material(0).set_shader_param("power", clamp(power, .0, MAX_POWER));
|
||
|
|
||
|
|
||
|
|
||
|
func _ready():
|
||
|
pass;
|
||
|
#change_engine_power(10);
|