godot_rl_DownFall / scripts /animated_char.gd
jtatman's picture
Upload folder using huggingface_hub
28e5bc3 verified
raw
history blame contribute delete
628 Bytes
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)