ScriptComponentBehaviour
public class Lumberjack : ScriptComponentBehaviour
{
private bool _initialized;
protected internal override void OnTick(float dt)
{
base.OnTick(dt);
if (!this._initialized)
{
this._initialized = true;
base.GameEntity.CreateSimpleSkeleton("human_skeleton");
base.GameEntity.CopyComponentsToSkeleton();
base.GameEntity.Skeleton.SetAnimationAtChannel("lumberjack", 0, 1f, -1f, 0f);
MetaMesh copy = MetaMesh.GetCopy("peasent_hatchet", true, false);
base.GameEntity.AddMultiMeshToSkeletonBone(copy, 27);
}
}
}Last updated