/*
 *	RailSim II Station Plugin
 *	Copyright (c) 2010 インターネット停留所
 */

PluginHeader{
	RailSimVersion = 2.13;
	PluginType = Station;
	PluginName = "遷車台テスト";
	PluginAuthor = "おかづ";
	IconTexture = "..\..\Train\Aizentranza01\Icon.png";
	Description = "遷車台 (トラバーサー) の記述サンプルです。";
}

StationInfo{
}

Platform{
	Stoppable = no;
	GirderPlugin = "";
	PierPlugin = "";
	PolePlugin = "";
	Coord = (-6.0, 0.0, -20.0);
	Coord = (-6.0, 0.0, -15.0);
}

Platform{
	Stoppable = no;
	Coord = (-6.0, 0.0, 15.0);
	Coord = (-6.0, 0.0, 20.0);
}

Platform{
	Stoppable = no;
	Coord = (-2.0, 0.0, -20.0);
	Coord = (-2.0, 0.0, -15.0);
}

Platform{
	Stoppable = no;
	Coord = (-2.0, 0.0, 15.0);
	Coord = (-2.0, 0.0, 20.0);
}

Platform{
	Stoppable = no;
	Coord = (2.0, 0.0, -20.0);
	Coord = (2.0, 0.0, -15.0);
}

Platform{
	Stoppable = no;
	Coord = (2.0, 0.0, 15.0);
	Coord = (2.0, 0.0, 20.0);
}

Platform{
	Stoppable = no;
	Coord = (6.0, 0.0, -20.0);
	Coord = (6.0, 0.0, -15.0);
}

Platform{
	Stoppable = no;
	Coord = (6.0, 0.0, 15.0);
	Coord = (6.0, 0.0, 20.0);
}

//	移動レール
Platform{
	Stoppable = no;
	TiePlugin = "";
	ParentObject = "SlidePlate";
	Coord = (0.0, 0.0, -15.0);
	Coord = (0.0, 0.0, 15.0);
}

DefineSwitch "移動"{
	Entry = "1番";
	Entry = "2番";
	Entry = "3番";
	Entry = "4番";
}

DefineSwitch "進入許可"{
	Entry = "有効";
	Entry = "無効";
}

PrimaryAssembly{
	Object3D "SlidePlate"{
		ModelFileName = "..\TurntableTest\RotationPlate.x";
		ModelScale = 1.0;
		ApplySwitch "移動"{
		Case 1:
			StaticMove{
				Displacement = (4.0, 0.0, 0.0);
				AnimationTime = 5.0;
			}
		Case 2:
			StaticMove{
				Displacement = (8.0, 0.0, 0.0);
				AnimationTime = 5.0;
			}
		Case 3:
			StaticMove{
				Displacement = (12.0, 0.0, 0.0);
				AnimationTime = 5.0;
			}
		}
		Joint3D "_LOCAL"{
			AttachCoord = (-6.0, 0.0, 0.0);
			AttachDir = (0.0, 0.0, 1.0);
		}
	}
	ApplySwitch "進入許可"{
	Case 0:
		ApplySwitch "移動"{
		Case 0:
			ConnectRail = 16, 1;
			ConnectRail = 17, 2;
		Case 1:
			ConnectRail = 16, 5;
			ConnectRail = 17, 6;
		Case 2:
			ConnectRail = 16, 9;
			ConnectRail = 17, 10;
		Case 3:
			ConnectRail = 16, 13;
			ConnectRail = 17, 14;
		}
	Case 1:
		DisconnectRail = 16;
		DisconnectRail = 17;
	}
}
