PluginHeader{
	RailSimVersion = 2.15;
	PluginType = Train;
	PluginName = "【Enth架空車】YER５０００形（２０m）";
	PluginAuthor = "Enthiesia";
	IconTexture = "../Common_Enth/enthiesiaicon.png";
	Description = "定義ファイル更新:200523";
}
TrainInfo{
	FrontLimit = 10.0;
	TailLimit = -10.0;
	MaxVelocity = 120.0;
	MaxAcceleration = 3.0;
	MaxDeceleration = 3.0;
	DoorClosingTime = 7;
}
DefineSwitch"――電源――"{
	Entry = "　";
}
DefineSwitch"電源"{
	GroupCommon = "電源"; 
	Entry = "入";
	Entry = "回送モード（照明のみ切）";
	Entry = "切（ランプ・照明を全消灯）";
	Entry = "パンタも下げる";
}
DefineSwitch"――見た目（アニメーション）――"{
	Entry = "　";
}
DefineSwitch"種別幕１コマ下げ"{
	GroupCommon = "種別幕１コマ下げ"; 
	Entry = "デフォルト";
	Entry = "";
	Entry = "→各停";
	Entry = "→準急";
	Entry = "→急行";
	Entry = "→快速";
	Entry = "→通勤準急";
	Entry = "→通勤急行";
	Entry = "→団体";
	Entry = "→臨時";
	Entry = "→各停（緑）";
	Entry = "→各停（ピンク）";
	Entry = "→";
	Entry = "→";
	Entry = "→";
	Entry = "→";
	Entry = "→";
}
DefineSwitch"種別幕１コマ上げ"{
	GroupCommon = "種別幕１コマ上げ"; 
	Entry = "デフォルト";
	Entry = "→基準(黒幕)";
	Entry = "→各停";
	Entry = "→準急";
	Entry = "→急行";
	Entry = "→快速";
	Entry = "→通勤準急";
	Entry = "→通勤急行";
	Entry = "→団体";
	Entry = "→臨時";
	Entry = "→各停（緑）";
	Entry = "→各停（ピンク）";
	Entry = "→";
	Entry = "→";
	Entry = "→";
	Entry = "→";
	Entry = "→";
}
DefineSwitch"方向幕１コマ下げ"{
	GroupCommon = "方向幕１コマ下げ";
	Entry = "デフォルト";
	Entry = "";
	Entry = "→横山";
	Entry = "→笠蒲";
	Entry = "→西浜";
	Entry = "→琴浜";
	Entry = "→横瀬⇔鶴浜";
	Entry = "→樫合";
	Entry = "→南河合";
	Entry = "→南喜多夢良";
	Entry = "→南田沢";
	Entry = "→栗宮テクノパーク";
	Entry = "→鶴浜";
	Entry = "→香坂";
	Entry = "→御ヶ崎";
	Entry = "→横瀬";
	Entry = "→藤沢";
	Entry = "→南関川";
	Entry = "→回送";
	Entry = "→試運転";
	Entry = "→団体";
	Entry = "→臨時";
	Entry = "→江那";
	Entry = "→関川";
	Entry = "→喜多夢良";
	Entry = "→所橋";
	Entry = "→所橋車庫";
	Entry = "→江下清水";
	Entry = "→東情学園前";
	Entry = "→双子山";
	Entry = "→西双子山";
	Entry = "→所橋⇔車庫";
	Entry = "→紀之原";
	Entry = "→巡音街道";
}
DefineSwitch"方向幕１コマ上げ"{
	GroupCommon = "方向幕１コマ上げ";
	Entry = "デフォルト";
	Entry = "→基準(黒幕)";
	Entry = "→横山";
	Entry = "→笠蒲";
	Entry = "→西浜";
	Entry = "→琴浜";
	Entry = "→横瀬⇔鶴浜";
	Entry = "→樫合";
	Entry = "→南河合";
	Entry = "→南喜多夢良";
	Entry = "→南田沢";
	Entry = "→栗宮テクノパーク";
	Entry = "→鶴浜";
	Entry = "→香坂";
	Entry = "→御ヶ崎";
	Entry = "→横瀬";
	Entry = "→藤沢";
	Entry = "→南関川";
	Entry = "→回送";
	Entry = "→試運転";
	Entry = "→団体";
	Entry = "→臨時";
	Entry = "→江那";
	Entry = "→関川";
	Entry = "→喜多夢良";
	Entry = "→所橋";
	Entry = "→所橋車庫";
	Entry = "→江下清水";
	Entry = "→東情学園前";
	Entry = "→双子山";
	Entry = "→西双子山";
	Entry = "→所橋⇔車庫";
	Entry = "→紀之原";
	Entry = "→巡音街道";
}
DefineSwitch"↑動かない時は"{
	Entry = "片方を「デフォルト」にして下さい";
}
DefineSwitch"旅客ドア開閉"{
	GroupCommon = "旅客ドア開閉";
	Entry = "自動（ホーム停車時に開）";
	Entry = "常時閉";
	Entry = "常時進行方向左側開";
	Entry = "常時進行方向右側開";
	Entry = "常時両側開";
}
DefineSwitch"前面ドア（先頭車のみ有効）"{
	Entry = "閉";
	Entry = "45°開（連結面用）";
	Entry = "90°開";
}
DefineSwitch"――見た目（静的）――"{
	Entry = "　";
}
DefineSwitch"運番"{
	GroupCommon = "運番";
	Entry = "０１Ｙ";
	Entry = "０２Ｙ";
	Entry = "０３Ｙ";
	Entry = "０４Ｙ";
	Entry = "０５Ｋ";
	Entry = "０６Ｋ";
	Entry = "０７Ｋ";
	Entry = "０８Ｍ";
	Entry = "０９Ｍ";
	Entry = "１０Ｍ";
	Entry = "９９";
	Entry = "（黒幕）";
}
DefineSwitch"電連"{
	GroupCommon = "電連";
	Entry = "あり";
	Entry = "なし";
}
DefineSwitch"パンタグラフ"{
	GroupCommon = "パンタグラフ";
	Entry = "上昇";
	Entry = "下降";
}
DefineSwitch"ラッピング"{
	GroupCommon = "ラッピング";
	Entry = "ラッピングなし";
	Entry = "その１（無塗装）";
	Entry = "その２（リバイバル）";
	Entry = "その３（カラフル）";
	Entry = "その４（高級感）";
}
DefineSwitch"――基礎設定――"{
	Entry = "　";
}
DefineSwitch"内装"{
	GroupCommon = "内装";
	Entry = "あり";
	Entry = "なし";
}
DefineSwitch"簡易シャドウ"{
	GroupCommon = "簡易シャドウ";
	Entry = "あり";
	Entry = "なし";
}
DefineSwitch"軌間"{
	GroupCommon = "軌間";
	Entry = "狭軌1067mm";
	Entry = "標準軌1435mm";
}
DefineSwitch"製造次"{
	GroupCommon = "製造次";
	Entry = "３次車";
	Entry = "１次・２次車";
}
DefineSwitch"号車"{
	Entry = "６両編成";
	Entry = "　　１号車（Tc / ５０５０）";
	Entry = "　　２号車（T / 弱冷房車 / ５１５０）";
	Entry = "　　３号車（M / ５０００）";
	Entry = "　　４号車（T / ５２５０）";
	Entry = "　　５号車（M / ５１００）";
	Entry = "　　６号車（Mc / 女性専用車 / ５２００）";
	Entry = "４両編成";
	Entry = "　　１号車（Tc / ５３５０）";
	Entry = "　　２号車（M / ５３００）";
	Entry = "　　３号車（M / ５４００）";
	Entry = "　　４号車（Tc / ５４５０）";
	Entry = "２両編成";
	Entry = "　　１号車（Tc / ５８５０）";
	Entry = "　　２号車（Mc / ５８００）";
}
DefineSwitch"編成"{
	GroupCommon = "編成";
	Entry = "５０５１Ｆ　（６両編成 / ２次車）";
	Entry = "５０５２Ｆ　（６両編成 / ２次車）";
	Entry = "５０５５Ｆ　（６両編成 / ２次車）";
	Entry = "５０６１Ｆ　（６両編成 / ３次車）";
	Entry = "５０６２Ｆ　（６両編成 / ３次車）";
	Entry = "５３５１Ｆ　（４両編成 / ２次車）";
	Entry = "５３５２Ｆ　（４両編成 / ２次車）";
	Entry = "５３６１Ｆ　（４両編成 / ３次車）";
	Entry = "５８５１Ｆ　（２両編成 / ２次車）";
	Entry = "５８６１Ｆ　（２両編成 / ３次車）";
}
PrimaryAssembly{
	Axle"syarinn1"{
		ModelFileName = "model_syarin86_n.x";
		ModelScale = 1.0;
		Turn = no;
		CastShadow = yes;

		ApplySwitch"軌間"{
			Case 1: ChangeModel = "model_syarin86_w.x",1.0;
		}//順番に注意

		Diameter = 0.86;
		Symmetric = 12;
		Coord = (8.2,0.43);
		WheelSound = yes;
	}
	Axle"syarinn2"{
		ModelFileName = "model_syarin86_n.x";
		ModelScale = 1.0;
		Turn = no;
		CastShadow = yes;

		ApplySwitch"軌間"{
			Case 1: ChangeModel = "model_syarin86_w.x",1.0;
		}//順番に注意

		Diameter = 0.86;
		Symmetric = 12;
		Coord = (6.1,0.43);
		WheelSound = yes;
	}
	Axle"syarinn3"{
		ModelFileName = "model_syarin86_n.x";
		ModelScale = 1.0;
		Turn = no;
		CastShadow = yes;

		ApplySwitch"軌間"{
			Case 1: ChangeModel = "model_syarin86_w.x",1.0;
		}//順番に注意

		Diameter = 0.86;
		Symmetric = 12;
		Coord = (-6.1,0.43);
		WheelSound = yes;
	}
	Axle"syarinn4"{
		ModelFileName = "model_syarin86_n.x";
		ModelScale = 1.0;
		Turn = no;
		CastShadow = yes;

		ApplySwitch"軌間"{
			Case 1: ChangeModel = "model_syarin86_w.x",1.0;
		}//順番に注意

		Diameter = 0.86;
		Symmetric = 12;
		Coord = (-8.2,0.43);
		WheelSound = yes;
	}
	Body"daisya1"{
		ModelFileName = "model_daisya_n.x";
		ModelScale = 1.0;
		Turn = no;
		CastShadow = yes;

		ApplySwitch"軌間"{
			Case 1: ChangeModel = "model_daisya_w.x",1.0;
		}

		JointZY"syarinn1"{
			AttachCoord = (0.0,0.0);
			LocalCoord = (1.05,0.43);
		}
		JointZY"syarinn2"{
			AttachCoord = (0.0,0.0);
			LocalCoord = (-1.05,0.43);
		}
	}
	Body"daisya2"{
		ModelFileName = "model_daisya_n.x";
		ModelScale = 1.0;
		Turn = no;
		CastShadow = yes;

		ApplySwitch"軌間"{
			Case 1: ChangeModel = "model_daisya_w.x",1.0;
		}

		JointZY"syarinn3"{
			AttachCoord = (0.0,0.0);
			LocalCoord = (1.05,0.43);
		}
		JointZY"syarinn4"{
			AttachCoord = (0.0,0.0);
			LocalCoord = (-1.05,0.43);
		}
	}
	Body"syatai"{
		ModelFileName = "";
		ModelScale = 1.0;
		Turn = no;
		CastShadow = yes;

		NoCastShadow = 0,1,10,11,12,13,16;
		Transparent = 0,1,10,11,12,13,16;

		If!"製造次"{
			ApplySwitch"号車"{
				Case 0, 1, 6, 7, 8, 11, 12, 13,14:
				ChangeModel = "model_body_s20_3.x", 1.0;
				Case 2, 3, 4, 5, 9, 10:
				ChangeModel = "model_body_t20_3.x", 1.0;
			}
		} Else {
			ApplySwitch"号車"{
				Case 0, 1, 6, 7, 8, 11, 12, 13,14:
				ChangeModel = "model_body_s20_2.x", 1.0;
				Case 2, 3, 4, 5, 9, 10:
				ChangeModel = "model_body_t20_2.x", 1.0;
			}
		}
//せんとうのとき
		If!"_FRONT"{
		If!"_CONNECT1"{
			If("電源" < 2){
				ChangeTexture =17, "tex_exterior.png";
			}
		}
		}
//うしろのとき
		If"_FRONT"{
		If!"_CONNECT1"{
			If("電源" < 2){
				ChangeTexture =18, "tex_exterior.png";
			}
		}
		}
//戸閉灯
		If("電源" < 2){
			If ("_DOOR1" || "_DOOR2"){
				ChangeTexture = 19, "tex_exterior.png";
			}
			If("旅客ドア開閉" > 1){
				ChangeTexture = 19, "tex_exterior.png";
			}
		}
		ApplySwitch"編成"{
			Case 1:ShiftTexture = 10, 0.50, 0.00;
			Case 2:ShiftTexture = 10, 0.00, 0.25;
			Case 3:ShiftTexture = 10, 0.50, 0.25;
			Case 4:ShiftTexture = 10, 0.00, 0.50;
			Case 5:ShiftTexture = 10, 0.50, 0.50;
			Case 6:ShiftTexture = 10, 0.00, 0.75;
			Case 7:ShiftTexture = 10, 0.50, 0.75;
			Case 8:ShiftTexture = 10, 0.00, 0.75;
			Case 9:ShiftTexture = 10, 0.50, 0.75;
		}
		ApplySwitch"号車"{ //号車ステッカ、車番
			Case 2:ShiftTexture = 12, 0.05, 0.00; ChangeTexture = 10, "tex_numside_2.png";
			Case 3:ShiftTexture = 12, 0.00, 0.05; ChangeTexture = 10, "tex_numside_3.png";
			Case 4:ShiftTexture = 12, 0.05, 0.05; ChangeTexture = 10, "tex_numside_4.png";
			Case 5:ShiftTexture = 12, 0.00, 0.10; ChangeTexture = 10, "tex_numside_5.png";
			Case 6:ShiftTexture = 12, 0.05, 0.10; ChangeTexture = 10, "tex_numside_6.png";
			Case 9:ShiftTexture = 12, 0.05, 0.00; ChangeTexture = 10, "tex_numside_2.png";
			Case 10:ShiftTexture = 12, 0.00, 0.05; ChangeTexture = 10, "tex_numside_3.png";
			Case 11:ShiftTexture = 12, 0.05, 0.05; ChangeTexture = 10, "tex_numside_4.png";
			Case 12, 13:ChangeTexture = 10, "tex_numside_5.png";
			Case 14:ShiftTexture = 12, 0.05, 0.00; ChangeTexture = 10, "tex_numside_6.png";
		}
		If("号車" != 2) { //弱冷房車
			ChangeTexture = 13, "../Common_Enth/tomei.png";
		}
		If("号車" != 6) { //女性専用車
			ChangeTexture = 11, "../Common_Enth/tomei.png";
		}
		ApplySwitch"ラッピング"{
			Case 1:ChangeTexture = 14, "tex_exteriorwrap_1.png"; ChangeTexture = 15, "tex_exteriorwrap_1.png";
			Case 2:ChangeTexture = 14, "tex_exteriorwrap_2.png"; ChangeTexture = 15, "tex_exteriorwrap_2.png";
			Case 3:
				ApplySwitch"号車"{
					Case 0, 1, 7, 8:ChangeTexture = 14, "tex_exteriorwrap_3-1.png"; ChangeTexture = 15, "tex_exteriorwrap_3-1.png";
					Case 2, 9:ChangeTexture = 14, "tex_exteriorwrap_3-2.png"; ChangeTexture = 15, "tex_exteriorwrap_3-2.png";
					Case 3, 10:ChangeTexture = 14, "tex_exteriorwrap_3-3.png"; ChangeTexture = 15, "tex_exteriorwrap_3-3.png";
					Case 4, 11:ChangeTexture = 14, "tex_exteriorwrap_3-4.png"; ChangeTexture = 15, "tex_exteriorwrap_3-4.png";
					Case 5 ,12, 13:ChangeTexture = 14, "tex_exteriorwrap_3-5.png"; ChangeTexture = 15, "tex_exteriorwrap_3-5.png";
					Case 6, 14:ChangeTexture = 14, "tex_exteriorwrap_3-6.png"; ChangeTexture = 15, "tex_exteriorwrap_3-6.png";
				}
			Case 4:ChangeTexture = 14, "tex_exteriorwrap_4.png"; ChangeTexture = 15, "tex_exteriorwrap_4.png";
		}
		If"製造次"{ //一二次車のみ　屋根ひだパンタ部分
			ApplySwitch"号車"{ Case 3, 5, 6, 9, 10:
				ChangeTexture = 16, "../Common_Enth/tomei.png";
			}
		}

		JointZY"daisya1"{
			AttachCoord = (0.0,-0.0);
			LocalCoord = (7.15,0.0);
		}
		JointZY"daisya2"{
			AttachCoord = (0.0,-0.0);
			LocalCoord = (-7.15,0.0);
		}
	}
	Object3D"interior"{
		ModelFileName = "";
		ModelScale = 1.0;
		CastShadow = no;

		NoShadow = 0;
		Transparent = 0;

		If!"内装"{
			If("電源" < 1){ //ON
				ApplySwitch"号車"{
					Case 0, 1, 6, 7, 8, 11, 12, 13, 14:
					ChangeModel = "model_interior_s20_1_light.x", 1.0;
					Case 2, 3, 4, 5, 9, 10:
					ChangeModel = "model_interior_t20_1_light.x", 1.0;
				}
			} Else { //OFF
				ApplySwitch"号車"{
					Case 0, 1, 6, 7, 8, 11, 12, 13, 14:
					ChangeModel = "model_interior_s20_1.x", 1.0;
					Case 2, 3, 4, 5, 9, 10:
					ChangeModel = "model_interior_t20_1.x", 1.0;
				}
			}
		}

		Joint3D"syatai"{
			AttachCoord = (0, 0, 0);
		}
	}
	Object3D"bodyshadow"{
		ModelFileName = "";
		ModelScale = 1.0;
		CastShadow = no;
		NoShadow = 0;
		Transparent = 0;

		ApplySwitch"簡易シャドウ"{
			Case 0:ChangeModel = "model_shadow.x", 1.0;
			Case 1:ChangeModel = "", 1.0;
		}
		Joint3D"syatai"{
			AttachCoord = (0, 0, 0);
		}
	}
//DOORスイッチはZ正方向基準
//左左
	Object3D"doorRL"{
		ModelFileName = "model_door_LL20.x";
		ModelScale = 1.0;
		NoShadow = 0,1;
		Transparent = 0,1;

		If!"製造次"{
			ShiftTexture = 4, 0.00, 0.1702;
		}
		ApplySwitch"ラッピング"{
			Case 1:ChangeTexture = 4, "tex_exteriorwrap_1.png";
			Case 2:ChangeTexture = 4, "tex_exteriorwrap_2.png";
			Case 3:
				ApplySwitch"号車"{
					Case 0, 1, 7, 8:ChangeTexture = 4, "tex_exteriorwrap_3-1.png";
					Case 2, 9:ChangeTexture = 4, "tex_exteriorwrap_3-2.png";
					Case 3, 10:ChangeTexture = 4, "tex_exteriorwrap_3-3.png";
					Case 4, 11:ChangeTexture = 4, "tex_exteriorwrap_3-4.png";
					Case 5, 12, 13:ChangeTexture = 4, "tex_exteriorwrap_3-5.png";
					Case 6, 14:ChangeTexture = 4, "tex_exteriorwrap_3-6.png";
				}
			Case 4:ChangeTexture = 4, "tex_exteriorwrap_4.png";
		}
		If("電源" < 1){
			ChangeTexture =5, "tex_interior.png";
		}
		If"_FRONT"{
			ApplySwitch"旅客ドア開閉"{
			Case 3:
				StaticMove{
					Displacement = (0,0,0.645);
					PreAnimationDelay = 0;
					AnimationTime = 3;
					PostAnimationDelay = 0;
				}
			}
		}
		If!"_FRONT"{
			ApplySwitch"旅客ドア開閉"{
			Case 2:
				StaticMove{
					Displacement = (0,0,0.645);
					PreAnimationDelay = 0;
					AnimationTime = 3;
					PostAnimationDelay = 0;
				}
			}
		}
		ApplySwitch"旅客ドア開閉"{
		Case 4:
			StaticMove{
				Displacement = (0,0,0.645);
				PreAnimationDelay = 0;
				AnimationTime = 3;
				PostAnimationDelay = 0;
			}
		}
		If"_DOOR1"{
			ApplySwitch"旅客ドア開閉"{
			Case 0:
				StaticMove{
					Displacement = (0,0,0.645);
					PreAnimationDelay = 1;
					AnimationTime = 3;
					PostAnimationDelay = 2;
				}
			}
		}
		Joint3D"syatai"{
			AttachCoord = (0,0,0);
		}
	}
//左右
	Object3D"doorRR"{
		ModelFileName = "model_door_LR20.x";
		ModelScale = 1.0;
		NoShadow = 0,1;
		Transparent = 0,1;

		If!"製造次"{
			ShiftTexture = 4, 0.00, 0.1702;
		}
		ApplySwitch"ラッピング"{
			Case 1:ChangeTexture = 4, "tex_exteriorwrap_1.png";
			Case 2:ChangeTexture = 4, "tex_exteriorwrap_2.png";
			Case 3:
				ApplySwitch"号車"{
					Case 0, 1, 7, 8:ChangeTexture = 4, "tex_exteriorwrap_3-1.png";
					Case 2, 9:ChangeTexture = 4, "tex_exteriorwrap_3-2.png";
					Case 3, 10:ChangeTexture = 4, "tex_exteriorwrap_3-3.png";
					Case 4, 11:ChangeTexture = 4, "tex_exteriorwrap_3-4.png";
					Case 5, 12, 13:ChangeTexture = 4, "tex_exteriorwrap_3-5.png";
					Case 6, 14:ChangeTexture = 4, "tex_exteriorwrap_3-6.png";
				}
			Case 4:ChangeTexture = 4, "tex_exteriorwrap_4.png";
		}
		If("電源" < 1){
			ChangeTexture =5, "tex_interior.png";
		}
		If"_FRONT"{
			ApplySwitch"旅客ドア開閉"{
				Case 3:StaticMove{
					Displacement = (0,0,-0.645);
					PreAnimationDelay = 0;
					AnimationTime = 3;
					PostAnimationDelay = 0;
				}
			}
		}
		If!"_FRONT"{
			ApplySwitch"旅客ドア開閉"{
				Case 2:StaticMove{
					Displacement = (0,0,-0.645);
					PreAnimationDelay = 0;
					AnimationTime = 3;
					PostAnimationDelay = 0;
				}
			}
		}
		ApplySwitch"旅客ドア開閉"{
			Case 4:StaticMove{
					Displacement = (0,0,-0.645);
					PreAnimationDelay = 0;
					AnimationTime = 3;
					PostAnimationDelay = 0;
			}
		}
		If"_DOOR1"{
			ApplySwitch"旅客ドア開閉"{
				Case 0:StaticMove{
					Displacement = (0,0,-0.645);
					PreAnimationDelay = 1;
					AnimationTime = 3;
					PostAnimationDelay = 2;
				}
			}
		}
		Joint3D"syatai"{
			AttachCoord = (0,0,0);
		}
	}
//右左
	Object3D"doorLL"{
		ModelFileName = "model_door_RL20.x";
		ModelScale = 1.0;
		NoShadow = 0,1;
		Transparent = 0,1;

		If!"製造次"{
			ShiftTexture = 4, 0.00, 0.1702;
		}
		ApplySwitch"ラッピング"{
			Case 1:ChangeTexture = 4, "tex_exteriorwrap_1.png";
			Case 2:ChangeTexture = 4, "tex_exteriorwrap_2.png";
			Case 3:
				ApplySwitch"号車"{
					Case 0, 1, 7, 8:ChangeTexture = 4, "tex_exteriorwrap_3-1.png";
					Case 2, 9:ChangeTexture = 4, "tex_exteriorwrap_3-2.png";
					Case 3, 10:ChangeTexture = 4, "tex_exteriorwrap_3-3.png";
					Case 4, 11:ChangeTexture = 4, "tex_exteriorwrap_3-4.png";
					Case 5, 12, 13:ChangeTexture = 4, "tex_exteriorwrap_3-5.png";
					Case 6, 14:ChangeTexture = 4, "tex_exteriorwrap_3-6.png";
				}
			Case 4:ChangeTexture = 4, "tex_exteriorwrap_4.png";
		}
		If("電源" < 1){
			ChangeTexture =5, "tex_interior.png";
		}
		If"_FRONT"{
			ApplySwitch"旅客ドア開閉"{
				Case 2:StaticMove{
					Displacement = (0,0,-0.645);
					PreAnimationDelay = 0;
					AnimationTime = 3;
					PostAnimationDelay = 0;
				}
			}
		}
		If!"_FRONT"{
			ApplySwitch"旅客ドア開閉"{
				Case 3:StaticMove{
					Displacement = (0,0,-0.645);
					PreAnimationDelay = 0;
					AnimationTime = 3;
					PostAnimationDelay = 0;
				}
			}
		}
		ApplySwitch"旅客ドア開閉"{
			Case 4:StaticMove{
					Displacement = (0,0,-0.645);
					PreAnimationDelay = 0;
					AnimationTime = 3;
					PostAnimationDelay = 0;
			}
		}
		If"_DOOR2"{
			ApplySwitch"旅客ドア開閉"{
				Case 0:StaticMove{
					Displacement = (0,0,-0.645);
					PreAnimationDelay = 1;
					AnimationTime = 3;
					PostAnimationDelay = 2;
				}
			}
		}
		Joint3D"syatai"{
			AttachCoord = (0,0,0);
		}
	}
//右右
	Object3D"doorLR"{
		ModelFileName = "model_door_RR20.x";
		ModelScale = 1.0;
		NoShadow = 0,1;
		Transparent = 0,1;

		If!"製造次"{
			ShiftTexture = 4, 0.00, 0.1702;
		}
		ApplySwitch"ラッピング"{
			Case 1:ChangeTexture = 4, "tex_exteriorwrap_1.png";
			Case 2:ChangeTexture = 4, "tex_exteriorwrap_2.png";
			Case 3:
				ApplySwitch"号車"{
					Case 0, 1, 7, 8:ChangeTexture = 4, "tex_exteriorwrap_3-1.png";
					Case 2, 9:ChangeTexture = 4, "tex_exteriorwrap_3-2.png";
					Case 3, 10:ChangeTexture = 4, "tex_exteriorwrap_3-3.png";
					Case 4, 11:ChangeTexture = 4, "tex_exteriorwrap_3-4.png";
					Case 5, 12, 13:ChangeTexture = 4, "tex_exteriorwrap_3-5.png";
					Case 6, 14:ChangeTexture = 4, "tex_exteriorwrap_3-6.png";
				}
			Case 4:ChangeTexture = 4, "tex_exteriorwrap_4.png";
		}
		If("電源" < 1){
			ChangeTexture =5, "tex_interior.png";
		}
		If"_FRONT"{
			ApplySwitch"旅客ドア開閉"{
				Case 2:StaticMove{
					Displacement = (0,0,0.645);
					PreAnimationDelay = 0;
					AnimationTime = 3;
					PostAnimationDelay = 0;
				}
			}
		}
		If!"_FRONT"{
			ApplySwitch"旅客ドア開閉"{
				Case 3:StaticMove{
					Displacement = (0,0,0.645);
					PreAnimationDelay = 0;
					AnimationTime = 3;
					PostAnimationDelay = 0;
				}
			}
		}
		ApplySwitch"旅客ドア開閉"{
			Case 4:StaticMove{
					Displacement = (0,0,0.645);
					PreAnimationDelay = 0;
					AnimationTime = 3;
					PostAnimationDelay = 0;
			}
		}
		If"_DOOR2"{
			ApplySwitch"旅客ドア開閉"{
				Case 0:StaticMove{
					Displacement = (0,0,0.645);
					PreAnimationDelay = 1;
					AnimationTime = 3;
					PostAnimationDelay = 2;
				}
			}
		}
		Joint3D"syatai"{
			AttachCoord = (0,0,0);
		}
	}
	Object3D"daisyatan"{
		ModelFileName = "";
		ModelScale = 1.0;
		If!"軌間"{
			ApplySwitch"号車"{ Case 0, 1, 6, 7, 8, 11, 12, 13, 14:ChangeModel = "model_daisyatan_n.x", 1.0; }
		} Else {
			ApplySwitch"号車"{ Case 0, 1, 6, 7, 8, 11, 12, 13, 14:ChangeModel = "model_daisyatan_w.x", 1.0; }
		}
		Joint3D"daisya1"{
			AttachCoord = (0, 0, 0);
		}
	}
	Object3D"yukashita"{
		ModelFileName = "";
		ModelScale = 1.0;
		ApplySwitch"号車"{
			Case 0, 1, 7, 8, 11, 12, 13:ChangeModel = "model_yukashita_Tc20.x", 1.0;
			Case 2, 4:ChangeModel = "model_yukashita_T20.x", 1.0;
			Case 6, 14:ChangeModel = "model_yukashita_Mc20.x", 1.0;
			Case 3, 5, 9, 10:ChangeModel = "model_yukashita_M20.x", 1.0;
		}
		Joint3D"syatai"{
			AttachCoord = (0, 0, 0);
		}
	}
	Object3D"airspring"{
		ModelFileName = "";
		ModelScale = 1.0;
		ApplySwitch"軌間"{
			Case 0:ChangeModel = "model_airspringbody_n20.x", 1.0;
			Case 1:ChangeModel = "model_airspringbody_w20.x", 1.0;
		}
		Joint3D"syatai"{
			AttachCoord = (0, 0, 0);
		}
	}
	Object3D"panta"{
		ModelFileName = "";
		ModelScale = 1.0;
		If!"製造次"{
			ApplySwitch"号車"{ Case 3, 5, 6, 9, 10, 14:
				If("電源" < 3){
					If!"パンタグラフ"{
						ChangeModel = "model_singlepanta_a.x", 1.0;
					} Else {
						ChangeModel = "model_singlepanta_b.x", 1.0;
					}
				} Else {
					ChangeModel = "model_singlepanta_b.x", 1.0;
				}
			}
		} Else {
			ApplySwitch"号車"{ Case 3, 5, 6, 9, 10, 14:
				If("電源" < 3){
					If!"パンタグラフ"{
						ChangeModel = "model_panta_a.x", 1.0;
					} Else {
						ChangeModel = "model_panta_b.x", 1.0;
					}
				} Else {
					ChangeModel = "model_panta_b.x", 1.0;
				}
			}
		}
		Joint3D"syatai"{
			AttachCoord = (0, 0, 0);
		}
	}
	Object3D"houkoumaku"{
		ModelFileName = "";
		ModelScale = 1.0;
		ApplySwitch"号車"{
			Case 0, 1, 6, 7, 8, 11, 12, 13, 14:ChangeModel = "model_houkou_s20.x", 1.0;
			Case 2, 3, 4, 5, 9, 10:ChangeModel = "model_houkou_t20.x", 1.0;
		}
		If("電源" < 2){
			ChangeTexture = 2, "tex_houkou_y.png";  ChangeTexture = 3, "tex_houkou_y.png"; 
		}
		If!"方向幕１コマ上げ"{
			ApplySwitch"方向幕１コマ下げ"{
				Case 2:ShiftTexture=0, 0, 0.00; ShiftTexture=1, 0, 0.03;
					ShiftTexture=2, 0, 0.00; ShiftTexture=3, 0, 0.03;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 3:ShiftTexture=0, 0, 0.03; ShiftTexture=1, 0, 0.06;
					ShiftTexture=2, 0, 0.03; ShiftTexture=3, 0, 0.06;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 4:ShiftTexture=0, 0, 0.06; ShiftTexture=1, 0, 0.09;
					ShiftTexture=2, 0, 0.06; ShiftTexture=3, 0, 0.09;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 5:ShiftTexture=0, 0, 0.09; ShiftTexture=1, 0, 0.12;
					ShiftTexture=2, 0, 0.09; ShiftTexture=3, 0, 0.12;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 6:ShiftTexture=0, 0, 0.12; ShiftTexture=1, 0, 0.15;
					ShiftTexture=2, 0, 0.12; ShiftTexture=3, 0, 0.15;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 7:ShiftTexture=0, 0, 0.15; ShiftTexture=1, 0, 0.18;
					ShiftTexture=2, 0, 0.15; ShiftTexture=3, 0, 0.18;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 8:ShiftTexture=0, 0, 0.18; ShiftTexture=1, 0, 0.21;
					ShiftTexture=2, 0, 0.18; ShiftTexture=3, 0, 0.21;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 9:ShiftTexture=0, 0, 0.21; ShiftTexture=1, 0, 0.24;
					ShiftTexture=2, 0, 0.21; ShiftTexture=3, 0, 0.24;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 10:ShiftTexture=0, 0, 0.24; ShiftTexture=1, 0, 0.27;
					ShiftTexture=2, 0, 0.24; ShiftTexture=3, 0, 0.27;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 11:ShiftTexture=0, 0, 0.27; ShiftTexture=1, 0, 0.30;
					ShiftTexture=2, 0, 0.27; ShiftTexture=3, 0, 0.30;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 12:ShiftTexture=0, 0, 0.30; ShiftTexture=1, 0, 0.33;
					ShiftTexture=2, 0, 0.30; ShiftTexture=3, 0, 0.33;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 13:ShiftTexture=0, 0, 0.33; ShiftTexture=1, 0, 0.36;
					ShiftTexture=2, 0, 0.33; ShiftTexture=3, 0, 0.36;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 14:ShiftTexture=0, 0, 0.36; ShiftTexture=1, 0, 0.39;
					ShiftTexture=2, 0, 0.36; ShiftTexture=3, 0, 0.39;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 15:ShiftTexture=0, 0, 0.39; ShiftTexture=1, 0, 0.42;
					ShiftTexture=2, 0, 0.39; ShiftTexture=3, 0, 0.42;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 16:ShiftTexture=0, 0, 0.42; ShiftTexture=1, 0, 0.45;
					ShiftTexture=2, 0, 0.42; ShiftTexture=3, 0, 0.45;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 17:ShiftTexture=0, 0, 0.45; ShiftTexture=1, 0, 0.48;
					ShiftTexture=2, 0, 0.45; ShiftTexture=3, 0, 0.48;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 18:ShiftTexture=0, 0, 0.48; ShiftTexture=1, 0, 0.51;
					ShiftTexture=2, 0, 0.48; ShiftTexture=3, 0, 0.51;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 19:ShiftTexture=0, 0, 0.51; ShiftTexture=1, 0, 0.54;
					ShiftTexture=2, 0, 0.51; ShiftTexture=3, 0, 0.54;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 20:ShiftTexture=0, 0, 0.54; ShiftTexture=1, 0, 0.57;
					ShiftTexture=2, 0, 0.54; ShiftTexture=3, 0, 0.57;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 21:ShiftTexture=0, 0, 0.57; ShiftTexture=1, 0, 0.60;
					ShiftTexture=2, 0, 0.57; ShiftTexture=3, 0, 0.60;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 22:ShiftTexture=0, 0, 0.60; ShiftTexture=1, 0, 0.63;
					ShiftTexture=2, 0, 0.60; ShiftTexture=3, 0, 0.63;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 23:ShiftTexture=0, 0, 0.63; ShiftTexture=1, 0, 0.66;
					ShiftTexture=2, 0, 0.63; ShiftTexture=3, 0, 0.66;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 24:ShiftTexture=0, 0, 0.66; ShiftTexture=1, 0, 0.69;
					ShiftTexture=2, 0, 0.66; ShiftTexture=3, 0, 0.69;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 25:ShiftTexture=0, 0, 0.69; ShiftTexture=1, 0, 0.72;
					ShiftTexture=2, 0, 0.69; ShiftTexture=3, 0, 0.72;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 26:ShiftTexture=0, 0, 0.72; ShiftTexture=1, 0, 0.75;
					ShiftTexture=2, 0, 0.72; ShiftTexture=3, 0, 0.75;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 27:ShiftTexture=0, 0, 0.75; ShiftTexture=1, 0, 0.78;
					ShiftTexture=2, 0, 0.75; ShiftTexture=3, 0, 0.78;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 28:ShiftTexture=0, 0, 0.78; ShiftTexture=1, 0, 0.81;
					ShiftTexture=2, 0, 0.78; ShiftTexture=3, 0, 0.81;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 29:ShiftTexture=0, 0, 0.81; ShiftTexture=1, 0, 0.84;
					ShiftTexture=2, 0, 0.81; ShiftTexture=3, 0, 0.84;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 30:ShiftTexture=0, 0, 0.84; ShiftTexture=1, 0, 0.87;
					ShiftTexture=2, 0, 0.84; ShiftTexture=3, 0, 0.87;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 31:ShiftTexture=0, 0, 0.87; ShiftTexture=1, 0, 0.90;
					ShiftTexture=2, 0, 0.87; ShiftTexture=3, 0, 0.90;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 32:ShiftTexture=0, 0, 0.90; ShiftTexture=1, 0, 0.93;
					ShiftTexture=2, 0, 0.90; ShiftTexture=3, 0, 0.93;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 33:ShiftTexture=0, 0, 0.93; ShiftTexture=1, 0, 0.96;
					ShiftTexture=2, 0, 0.93; ShiftTexture=3, 0, 0.96;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 34:ShiftTexture=0, 0, 0.96; ShiftTexture=1, 0, 0.99;
					ShiftTexture=2, 0, 0.96; ShiftTexture=3, 0, 0.99;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
			}
		}
		If!"方向幕１コマ下げ"{
			ApplySwitch"方向幕１コマ上げ"{
				Case 1:ShiftTexture=0, 0, 0.00; ShiftTexture=1, 0, 0.03;
					ShiftTexture=2, 0, 0.00; ShiftTexture=3, 0, 0.03;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 2:ShiftTexture=0, 0, 0.03; ShiftTexture=1, 0, 0.06;
					ShiftTexture=2, 0, 0.03; ShiftTexture=3, 0, 0.06;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 3:ShiftTexture=0, 0, 0.06; ShiftTexture=1, 0, 0.09;
					ShiftTexture=2, 0, 0.06; ShiftTexture=3, 0, 0.09;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 4:ShiftTexture=0, 0, 0.09; ShiftTexture=1, 0, 0.12;
					ShiftTexture=2, 0, 0.09; ShiftTexture=3, 0, 0.12;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 5:ShiftTexture=0, 0, 0.12; ShiftTexture=1, 0, 0.15;
					ShiftTexture=2, 0, 0.12; ShiftTexture=3, 0, 0.15;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 6:ShiftTexture=0, 0, 0.15; ShiftTexture=1, 0, 0.18;
					ShiftTexture=2, 0, 0.15; ShiftTexture=3, 0, 0.18;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 7:ShiftTexture=0, 0, 0.18; ShiftTexture=1, 0, 0.21;
					ShiftTexture=2, 0, 0.18; ShiftTexture=3, 0, 0.21;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 8:ShiftTexture=0, 0, 0.21; ShiftTexture=1, 0, 0.24;
					ShiftTexture=2, 0, 0.21; ShiftTexture=3, 0, 0.24;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 9:ShiftTexture=0, 0, 0.24; ShiftTexture=1, 0, 0.27;
					ShiftTexture=2, 0, 0.24; ShiftTexture=3, 0, 0.27;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 10:ShiftTexture=0, 0, 0.27; ShiftTexture=1, 0, 0.30;
					ShiftTexture=2, 0, 0.27; ShiftTexture=3, 0, 0.30;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 11:ShiftTexture=0, 0, 0.30; ShiftTexture=1, 0, 0.33;
					ShiftTexture=2, 0, 0.30; ShiftTexture=3, 0, 0.33;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 12:ShiftTexture=0, 0, 0.33; ShiftTexture=1, 0, 0.36;
					ShiftTexture=2, 0, 0.33; ShiftTexture=3, 0, 0.36;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 13:ShiftTexture=0, 0, 0.36; ShiftTexture=1, 0, 0.39;
					ShiftTexture=2, 0, 0.36; ShiftTexture=3, 0, 0.39;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 14:ShiftTexture=0, 0, 0.39; ShiftTexture=1, 0, 0.42;
					ShiftTexture=2, 0, 0.39; ShiftTexture=3, 0, 0.42;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 15:ShiftTexture=0, 0, 0.42; ShiftTexture=1, 0, 0.45;
					ShiftTexture=2, 0, 0.42; ShiftTexture=3, 0, 0.45;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 16:ShiftTexture=0, 0, 0.45; ShiftTexture=1, 0, 0.48;
					ShiftTexture=2, 0, 0.45; ShiftTexture=3, 0, 0.48;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 17:ShiftTexture=0, 0, 0.48; ShiftTexture=1, 0, 0.51;
					ShiftTexture=2, 0, 0.48; ShiftTexture=3, 0, 0.51;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 18:ShiftTexture=0, 0, 0.51; ShiftTexture=1, 0, 0.54;
					ShiftTexture=2, 0, 0.51; ShiftTexture=3, 0, 0.54;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 19:ShiftTexture=0, 0, 0.54; ShiftTexture=1, 0, 0.57;
					ShiftTexture=2, 0, 0.54; ShiftTexture=3, 0, 0.57;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 20:ShiftTexture=0, 0, 0.57; ShiftTexture=1, 0, 0.60;
					ShiftTexture=2, 0, 0.57; ShiftTexture=3, 0, 0.60;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 21:ShiftTexture=0, 0, 0.60; ShiftTexture=1, 0, 0.63;
					ShiftTexture=2, 0, 0.60; ShiftTexture=3, 0, 0.63;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 22:ShiftTexture=0, 0, 0.63; ShiftTexture=1, 0, 0.66;
					ShiftTexture=2, 0, 0.63; ShiftTexture=3, 0, 0.66;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 23:ShiftTexture=0, 0, 0.66; ShiftTexture=1, 0, 0.69;
					ShiftTexture=2, 0, 0.66; ShiftTexture=3, 0, 0.69;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 24:ShiftTexture=0, 0, 0.69; ShiftTexture=1, 0, 0.72;
					ShiftTexture=2, 0, 0.69; ShiftTexture=3, 0, 0.72;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 25:ShiftTexture=0, 0, 0.72; ShiftTexture=1, 0, 0.75;
					ShiftTexture=2, 0, 0.72; ShiftTexture=3, 0, 0.75;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 26:ShiftTexture=0, 0, 0.75; ShiftTexture=1, 0, 0.78;
					ShiftTexture=2, 0, 0.75; ShiftTexture=3, 0, 0.78;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 27:ShiftTexture=0, 0, 0.78; ShiftTexture=1, 0, 0.81;
					ShiftTexture=2, 0, 0.78; ShiftTexture=3, 0, 0.81;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 28:ShiftTexture=0, 0, 0.81; ShiftTexture=1, 0, 0.84;
					ShiftTexture=2, 0, 0.81; ShiftTexture=3, 0, 0.84;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 29:ShiftTexture=0, 0, 0.84; ShiftTexture=1, 0, 0.87;
					ShiftTexture=2, 0, 0.84; ShiftTexture=3, 0, 0.87;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 30:ShiftTexture=0, 0, 0.87; ShiftTexture=1, 0, 0.90;
					ShiftTexture=2, 0, 0.87; ShiftTexture=3, 0, 0.90;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 31:ShiftTexture=0, 0, 0.90; ShiftTexture=1, 0, 0.93;
					ShiftTexture=2, 0, 0.90; ShiftTexture=3, 0, 0.93;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 32:ShiftTexture=0, 0, 0.93; ShiftTexture=1, 0, 0.96;
					ShiftTexture=2, 0, 0.93; ShiftTexture=3, 0, 0.96;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 33:ShiftTexture=0, 0, 0.96; ShiftTexture=1, 0, 0.99;
					ShiftTexture=2, 0, 0.96; ShiftTexture=3, 0, 0.99;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
			}
		}
		If("方向幕１コマ下げ"=="方向幕１コマ上げ"){
			ApplySwitch"方向幕１コマ下げ"{
				Case 2:ShiftTexture=1, 0, 0.03; ShiftTexture=3, 0, 0.03;
				Case 3:ShiftTexture=1, 0, 0.06; ShiftTexture=3, 0, 0.06;
				Case 4:ShiftTexture=1, 0, 0.09; ShiftTexture=3, 0, 0.09;
				Case 5:ShiftTexture=1, 0, 0.12; ShiftTexture=3, 0, 0.12;
				Case 6:ShiftTexture=1, 0, 0.15; ShiftTexture=3, 0, 0.15;
				Case 7:ShiftTexture=1, 0, 0.18; ShiftTexture=3, 0, 0.18;
				Case 8:ShiftTexture=1, 0, 0.21; ShiftTexture=3, 0, 0.21;
				Case 9:ShiftTexture=1, 0, 0.24; ShiftTexture=3, 0, 0.24;
				Case 10:ShiftTexture=1, 0, 0.27; ShiftTexture=3, 0, 0.27;
				Case 11:ShiftTexture=1, 0, 0.30; ShiftTexture=3, 0, 0.30;
				Case 12:ShiftTexture=1, 0, 0.33; ShiftTexture=3, 0, 0.33;
				Case 13:ShiftTexture=1, 0, 0.36; ShiftTexture=3, 0, 0.36;
				Case 14:ShiftTexture=1, 0, 0.39; ShiftTexture=3, 0, 0.39;
				Case 15:ShiftTexture=1, 0, 0.42; ShiftTexture=3, 0, 0.42;
				Case 16:ShiftTexture=1, 0, 0.45; ShiftTexture=3, 0, 0.45;
				Case 17:ShiftTexture=1, 0, 0.48; ShiftTexture=3, 0, 0.48;
				Case 18:ShiftTexture=1, 0, 0.51; ShiftTexture=3, 0, 0.51;
				Case 19:ShiftTexture=1, 0, 0.54; ShiftTexture=3, 0, 0.54;
				Case 20:ShiftTexture=1, 0, 0.57; ShiftTexture=3, 0, 0.57;
				Case 21:ShiftTexture=1, 0, 0.60; ShiftTexture=3, 0, 0.60;
				Case 22:ShiftTexture=1, 0, 0.63; ShiftTexture=3, 0, 0.63;
				Case 23:ShiftTexture=1, 0, 0.66; ShiftTexture=3, 0, 0.66;
				Case 24:ShiftTexture=1, 0, 0.69; ShiftTexture=3, 0, 0.69;
				Case 25:ShiftTexture=1, 0, 0.72; ShiftTexture=3, 0, 0.72;
				Case 26:ShiftTexture=1, 0, 0.75; ShiftTexture=3, 0, 0.75;
				Case 27:ShiftTexture=1, 0, 0.78; ShiftTexture=3, 0, 0.78;
				Case 28:ShiftTexture=1, 0, 0.81; ShiftTexture=3, 0, 0.81;
				Case 29:ShiftTexture=1, 0, 0.84; ShiftTexture=3, 0, 0.84;
				Case 30:ShiftTexture=1, 0, 0.87; ShiftTexture=3, 0, 0.87;
				Case 31:ShiftTexture=1, 0, 0.90; ShiftTexture=3, 0, 0.90;
				Case 32:ShiftTexture=1, 0, 0.93; ShiftTexture=3, 0, 0.93;
				Case 33:ShiftTexture=1, 0, 0.96; ShiftTexture=3, 0, 0.96;
				Case 34:ShiftTexture=1, 0, 0.99; ShiftTexture=3, 0, 0.99;
			}
		}

		Joint3D"syatai"{
			AttachCoord = (0, 0, 0);
		}
	}
	Object3D"syubetsumaku"{
		ModelFileName = "";
		ModelScale = 1.0;
		ApplySwitch"号車"{
			Case 0, 1, 6, 7, 8, 11, 12, 13, 14:ChangeModel = "model_syubetsu_s20.x", 1.0;
			Case 2, 3, 4, 5, 9, 10:ChangeModel = "model_syubetsu_t20.x", 1.0;
		}
		If("電源" < 2){
			ChangeTexture = 2, "tex_houkou_s.png";  ChangeTexture = 3, "tex_houkou_s.png"; 
		}
		If!"種別幕１コマ上げ"{
			ApplySwitch"種別幕１コマ下げ"{
				Case 2:ShiftTexture=0, 0, 0.00; ShiftTexture=1, 0, 0.0625;
					ShiftTexture=2, 0, 0.00; ShiftTexture=3, 0, 0.0625;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 3:ShiftTexture=0, 0, 0.0625; ShiftTexture=1, 0, 0.125;
					ShiftTexture=2, 0, 0.0625; ShiftTexture=3, 0, 0.125;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 4:ShiftTexture=0, 0, 0.125; ShiftTexture=1, 0, 0.1875;
					ShiftTexture=2, 0, 0.125; ShiftTexture=3, 0, 0.1875;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 5:ShiftTexture=0, 0, 0.1875; ShiftTexture=1, 0, 0.25;
					ShiftTexture=2, 0, 0.1875; ShiftTexture=3, 0, 0.25;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 6:ShiftTexture=0, 0, 0.25; ShiftTexture=1, 0, 0.3125;
					ShiftTexture=2, 0, 0.25; ShiftTexture=3, 0, 0.3125;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 7:ShiftTexture=0, 0, 0.3125; ShiftTexture=1, 0, 0.375;
					ShiftTexture=2, 0, 0.3125; ShiftTexture=3, 0, 0.375;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 8:ShiftTexture=0, 0, 0.375; ShiftTexture=1, 0, 0.4375;
					ShiftTexture=2, 0, 0.375; ShiftTexture=3, 0, 0.4375;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 9:ShiftTexture=0, 0, 0.4375; ShiftTexture=1, 0, 0.50;
					ShiftTexture=2, 0, 0.4375; ShiftTexture=3, 0, 0.50;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 10:ShiftTexture=0, 0, 0.50; ShiftTexture=1, 0, 0.5625;
					ShiftTexture=2, 0, 0.50; ShiftTexture=3, 0, 0.5625;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 11:ShiftTexture=0, 0, 0.5625; ShiftTexture=1, 0, 0.625;
					ShiftTexture=2, 0, 0.5625; ShiftTexture=3, 0, 0.625;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 12:ShiftTexture=0, 0, 0.625; ShiftTexture=1, 0, 0.6875;
					ShiftTexture=2, 0, 0.625; ShiftTexture=3, 0, 0.6875;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 13:ShiftTexture=0, 0, 0.6875; ShiftTexture=1, 0, 0.75;
					ShiftTexture=2, 0, 0.6875; ShiftTexture=3, 0, 0.75;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 14:ShiftTexture=0, 0, 0.75; ShiftTexture=1, 0, 0.8125;
					ShiftTexture=2, 0, 0.75; ShiftTexture=3, 0, 0.8125;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 15:ShiftTexture=0, 0, 0.8125; ShiftTexture=1, 0, 0.875;
					ShiftTexture=2, 0, 0.8125; ShiftTexture=3, 0, 0.875;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 16:ShiftTexture=0, 0, 0.875; ShiftTexture=1, 0, 0.9375;
					ShiftTexture=2, 0, 0.875; ShiftTexture=3, 0, 0.9375;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=0;}
					StaticMove{Displacement=(0, 0.22, 0); AnimationTime=2; ReverseTime=0;}
			}
		}
		If!"種別幕１コマ下げ"{
			ApplySwitch"種別幕１コマ上げ"{
				Case 1:ShiftTexture=0, 0, 0.00; ShiftTexture=1, 0, 0.0625;
					ShiftTexture=2, 0, 0.00; ShiftTexture=3, 0, 0.0625;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 2:ShiftTexture=0, 0, 0.0625; ShiftTexture=1, 0, 0.125;
					ShiftTexture=2, 0, 0.0625; ShiftTexture=3, 0, 0.125;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 3:ShiftTexture=0, 0, 0.125; ShiftTexture=1, 0, 0.1875;
					ShiftTexture=2, 0, 0.125; ShiftTexture=3, 0, 0.1875;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 4:ShiftTexture=0, 0, 0.1875; ShiftTexture=1, 0, 0.25;
					ShiftTexture=2, 0, 0.1875; ShiftTexture=3, 0, 0.25;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 5:ShiftTexture=0, 0, 0.25; ShiftTexture=1, 0, 0.3125;
					ShiftTexture=2, 0, 0.25; ShiftTexture=3, 0, 0.3125;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 6:ShiftTexture=0, 0, 0.3125; ShiftTexture=1, 0, 0.375;
					ShiftTexture=2, 0, 0.3125; ShiftTexture=3, 0, 0.375;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 7:ShiftTexture=0, 0, 0.375; ShiftTexture=1, 0, 0.4375;
					ShiftTexture=2, 0, 0.375; ShiftTexture=3, 0, 0.4375;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 8:ShiftTexture=0, 0, 0.4375; ShiftTexture=1, 0, 0.50;
					ShiftTexture=2, 0, 0.4375; ShiftTexture=3, 0, 0.50;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 9:ShiftTexture=0, 0, 0.50; ShiftTexture=1, 0, 0.5625;
					ShiftTexture=2, 0, 0.50; ShiftTexture=3, 0, 0.5625;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 10:ShiftTexture=0, 0, 0.5625; ShiftTexture=1, 0, 0.625;
					ShiftTexture=2, 0, 0.5625; ShiftTexture=3, 0, 0.625;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 11:ShiftTexture=0, 0, 0.625; ShiftTexture=1, 0, 0.6875;
					ShiftTexture=2, 0, 0.625; ShiftTexture=3, 0, 0.6875;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 12:ShiftTexture=0, 0, 0.6875; ShiftTexture=1, 0, 0.75;
					ShiftTexture=2, 0, 0.6875; ShiftTexture=3, 0, 0.75;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 13:ShiftTexture=0, 0, 0.75; ShiftTexture=1, 0, 0.8125;
					ShiftTexture=2, 0, 0.75; ShiftTexture=3, 0, 0.8125;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 14:ShiftTexture=0, 0, 0.8125; ShiftTexture=1, 0, 0.875;
					ShiftTexture=2, 0, 0.8125; ShiftTexture=3, 0, 0.875;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
				Case 15:ShiftTexture=0, 0, 0.875; ShiftTexture=1, 0, 0.9375;
					ShiftTexture=2, 0, 0.875; ShiftTexture=3, 0, 0.9375;
					StaticMove{Displacement=(0, -0.22, 0); AnimationTime=2; ReverseTime=0;}
			}
		}
		If("種別幕１コマ下げ"=="種別幕１コマ上げ"){
			ApplySwitch"種別幕１コマ下げ"{
				Case 2:ShiftTexture=1, 0, 0.0625; ShiftTexture=3, 0, 0.0625;
				Case 3:ShiftTexture=1, 0, 0.125; ShiftTexture=3, 0, 0.125;
				Case 4:ShiftTexture=1, 0, 0.1875; ShiftTexture=3, 0, 0.1875;
				Case 5:ShiftTexture=1, 0, 0.25; ShiftTexture=3, 0, 0.25;
				Case 6:ShiftTexture=1, 0, 0.3125; ShiftTexture=3, 0, 0.3125;
				Case 7:ShiftTexture=1, 0, 0.375; ShiftTexture=3, 0, 0.375;
				Case 8:ShiftTexture=1, 0, 0.4375; ShiftTexture=3, 0, 0.4375;
				Case 9:ShiftTexture=1, 0, 0.5; ShiftTexture=3, 0, 0.50;
				Case 10:ShiftTexture=1, 0, 0.5625; ShiftTexture=3, 0, 0.5625;
				Case 11:ShiftTexture=1, 0, 0.625; ShiftTexture=3, 0, 0.625;
				Case 12:ShiftTexture=1, 0, 0.6875; ShiftTexture=3, 0, 0.6875;
				Case 13:ShiftTexture=1, 0, 0.75; ShiftTexture=3, 0, 0.75;
				Case 14:ShiftTexture=1, 0, 0.8125; ShiftTexture=3, 0, 0.8125;
				Case 15:ShiftTexture=1, 0, 0.875; ShiftTexture=3, 0, 0.875;
				Case 16:ShiftTexture=1, 0, 0.9375; ShiftTexture=3, 0, 0.9375;
			}
		}

		Joint3D"syatai"{
			AttachCoord = (0, 0, 0);
		}
	}
	Object3D"frontdoor"{
		ModelFileName = "";
		ModelScale = 1.0;
		NoShadow = 0;
		NoCastShadow = 7;
		Transparent = 0, 7;

		If!"製造次"{
			ApplySwitch"号車"{
				Case 0, 1, 6, 7, 8, 11, 12, 13, 14:
				ChangeModel = "model_frontdoor_s20_3.x", 1.0;
			}
		} Else {
			ApplySwitch"号車"{
				Case 0, 1, 6, 7, 8, 11, 12, 13, 14:
				ChangeModel = "model_frontdoor_s20_2.x", 1.0;
			}
		}
//せんとうのとき
		If!"_FRONT"{
		If!"_CONNECT1"{
			If("電源" < 2){
				ChangeTexture =9, "tex_exterior.png";
			}
		}
		}
//うしろのとき
		If"_FRONT"{
		If!"_CONNECT1"{
			If("電源" < 2){
				ChangeTexture =10, "tex_exterior.png";
			}
		}
		}
//先頭車番
		ApplySwitch"編成"{
			Case 1:ShiftTexture = 7, 0.50, 0.00;
			Case 2:ShiftTexture = 7, 0.00, 0.25;
			Case 3:ShiftTexture = 7, 0.50, 0.25;
			Case 4:ShiftTexture = 7, 0.00, 0.50;
			Case 5:ShiftTexture = 7, 0.50, 0.50;
			Case 6:ShiftTexture = 7, 0.00, 0.75;
			Case 7:ShiftTexture = 7, 0.50, 0.75;
//追加_2両用先頭車番
			Case 8:
				ChangeTexture = 7, "tex_numfront_2r.png";
				ApplySwitch"号車"{
					Case 14:ChangeTexture = 7, "tex_numfront_2r.png"; ShiftTexture = 7, 0.50, 0.00;
				}
			Case 9:
				ChangeTexture = 7, "tex_numfront_2r.png";
				ApplySwitch"号車"{
					Case 12, 13:ShiftTexture = 7, 0.00, 0.25;
					Case 14:ShiftTexture = 7, 0.50, 0.25;
				}
		}
		ApplySwitch"号車"{
			Case 6,11:ChangeTexture = 7, "tex_numfront_last.png";
		}
//運番
		If("電源" > 1){ //電源切のときに必ず黒幕にする
			ShiftTexture = 4, 0.50, 0.8333;
		} Else {
			ChangeTexture = 11, "tex_unban.png";
			ApplySwitch"運番"{
				Case 1:ShiftTexture = 11, 0.00, 0.1666;
				Case 2:ShiftTexture = 11, 0.00, 0.3333;
				Case 3:ShiftTexture = 11, 0.00, 0.50;
				Case 4:ShiftTexture = 11, 0.00, 0.6666;
				Case 5:ShiftTexture = 11, 0.00, 0.8333;
				Case 6:ShiftTexture = 11, 0.50, 0.00;
				Case 7:ShiftTexture = 11, 0.50, 0.1666;
				Case 8:ShiftTexture = 11, 0.50, 0.3333;
				Case 9:ShiftTexture = 11, 0.50, 0.50;
				Case 10:ShiftTexture = 11, 0.50, 0.6666;
				Case 11:ShiftTexture = 11, 0.50, 0.8333;
			}
		}
		ApplySwitch"ラッピング"{
			Case 1:ChangeTexture = 8, "tex_exteriorwrap_1.png";
			Case 2:ChangeTexture = 8, "tex_exteriorwrap_2.png";
			Case 3:
				ApplySwitch"号車"{
					Case 0, 1, 7, 8:ChangeTexture = 8, "tex_exteriorwrap_3-1.png";
					Case 2, 9:ChangeTexture = 8, "tex_exteriorwrap_3-2.png";
					Case 3, 10:ChangeTexture = 8, "tex_exteriorwrap_3-3.png";
					Case 4, 11:ChangeTexture = 8, "tex_exteriorwrap_3-4.png";
					Case 5, 12, 13:ChangeTexture = 8, "tex_exteriorwrap_3-5.png";
					Case 6, 14:ChangeTexture = 8, "tex_exteriorwrap_3-6.png";
				}
			Case 4:ChangeTexture = 8, "tex_exteriorwrap_4.png";
		}
		ApplySwitch"前面ドア（先頭車のみ有効）"{
			Case 1:
				StaticRotation{
					RotationAxis = (0, 1, 0);
					RotationAngle= 45;
					PreAnimationDelay = 0;
					AnimationTime = 4.0;
					PostAnimationDelay = 0.0;
				}
			Case 2:
				StaticRotation{
					RotationAxis = (0, 1, 0);
					RotationAngle= 90;
					PreAnimationDelay = 0;
					AnimationTime = 4.0;
					PostAnimationDelay = 0.0;
				}
		}

		Joint3D"syatai"{
			AttachCoord = (1.27, 0, 9.65);
		}
	}
	Object3D"denren"{
		ModelFileName = "";
		ModelScale = 1.0;
		If!"電連"{
			ApplySwitch"号車"{
				Case 0, 1, 6, 7, 8, 11, 12, 13, 14:ChangeModel = "model_denren_s20.x", 1.0;
			}
		}
		Joint3D"syatai"{
			AttachCoord = (0, 0, 0);
		}
	}
	Object3D"frontwindow"{
		ModelFileName = "";
		ModelScale = 1.0;
		NoShadow = 0;
		Transparent = 0;
		ApplySwitch"号車"{
			Case 0, 1, 6, 7, 8, 11, 12, 13, 14:ChangeModel = "model_frontwindow_s20.x", 1.0;
		}
		Joint3D"syatai"{
			AttachCoord = (0, 0, 0);
		}
	}

	If!"_FRONT"{
	If!"_CONNECT1"{
	If("電源" < 2){
	ApplySwitch"号車"{ Case 0, 1, 6, 7, 8, 11, 12, 13, 14:
		If!"製造次"{
			Headlight{
				AttachObject = "syatai";
				SourceCoord = (-0.69, 1.18, 9.61);
				Direction = (0.0, 0.0, 15.0);
				MaxDistance = 100.0;
				LensFlare{
					StartAngle = 75.0;
					Circle{
						Distance = 0.0;
						Radius = 0.2;
						InnerColor = #f0ffffff;
						OuterColor = #00000000;
					}
				}
			}
			If!"前面ドア（先頭車のみ有効）"{
			Headlight{
				AttachObject = "syatai";
				SourceCoord = (0.69, 1.18, 9.61);
				Direction = (0.0, 0.0, 15.0);
				MaxDistance = 100.0;
				LensFlare{
					StartAngle = 75.0;
					Circle{
						Distance = 0.0;
						Radius = 0.2;
						InnerColor = #f0ffffff;
						OuterColor = #00000000;
					}
				}
			}
			}
		} Else {
			Headlight{
				AttachObject = "syatai";
				SourceCoord = (-0.73, 1.25, 9.61);
				Direction = (0.0, 0.0, 15.0);
				MaxDistance = 100.0;
				LensFlare{
					StartAngle = 75.0;
					Circle{
						Distance = 0.0;
						Radius = 0.2;
						InnerColor = #f0ffffff;
						OuterColor = #00000000;
					}
				}
			}
			If!"前面ドア（先頭車のみ有効）"{
			Headlight{
				AttachObject = "syatai";
				SourceCoord = (0.73, 1.25, 9.61);
				Direction = (0.0, 0.0, 15.0);
				MaxDistance = 100.0;
				LensFlare{
					StartAngle = 75.0;
					Circle{
						Distance = 0.0;
						Radius = 0.2;
						InnerColor = #f0ffffff;
						OuterColor = #00000000;
					}
				}
			}
			}
		}
	}
	}
	}
	}
	FrontCabin{
		Joint3D "syatai"{
			AttachCoord = (-0.7, 2.5, 8.4);
			DirLink = "daisya1";
		}
	}
}