File size: 628 Bytes
c5a8672 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
extends Node3D
@onready var materials = [
preload("res://materials/GreenChar.tres"),
preload("res://materials/BlueChar.tres"),
preload("res://materials/GreenYellowChar.tres"),
preload("res://materials/LightBlueChar.tres"),
preload("res://materials/LightGreenChar.tres"),
preload("res://materials/PinkChar.tres"),
preload("res://materials/RedChar.tres"),
preload("res://materials/YellowChar.tres"),
]
func play_anim(anim):
$AnimationPlayer.play(anim)
func _ready():
var mesh = $"KayKit Animated Character/Skeleton3D/PrototypePete".mesh
var material = materials.pick_random()
mesh.surface_set_material(0, material)
|