include "DefaultSteamCabin.gs"


class PB15Cabin isclass DefaultSteamCabin
{
	thread void RunAnimation(void);


	public void Init(void)
	{
		inherited();

		RunAnimation();
	}

	thread void RunAnimation(void)
	{
		SetFXAnimationState("idle1", true);

		wait()
		{
			on "Animation-Event", "Coalman_loop1_end":
				SetFXAnimationState("idle1", false);
				SetFXAnimationState("idle2", true);
				continue;

			on "Animation-Event", "Coalman_loop2_end":
				SetFXAnimationState("idle2", false);
				SetFXAnimationState("idle1", true);
				continue;

			on "Animation-Event", "Coalman_loop2shovel_end":
				SetFXAnimationState("loop2shovel", false);
				SetFXAnimationState("shovel", true);
				continue;
			
			on "Animation-Event", "Coalman_shovel_end":
				SetFXAnimationState("shovel", false);
				SetFXAnimationState("wipebrow", true);
				continue;

			on "Animation-Event", "Coalman_wipebrow_end":
				SetFXAnimationState("wipebrow", false);
				SetFXAnimationState("shovel2loop", true);	
				continue;

			on "Animation-Event", "Coalman_shovel2loop_end":
				SetFXAnimationState("shovel2loop", false);
				SetFXAnimationState("idle1", true);
				shovellingCoal = false;
				continue;

			on "Animation-Event", "Coalman_wave_end":
				SetFXAnimationState("wave", false);
				SetFXAnimationState("idle1", true);
				waving = false;
				continue;

		}
	}
	
};