
PluginHeader{
	RailSimVersion = 2.00;
	PluginType = Train;
	PluginName = "大阪市交通局 新20系 先頭車";
	PluginAuthor = "n";
	IconTexture = "icon.png";
}
TrainInfo{
	FrontLimit = 9.55;
	TailLimit = -9.35;
	MaxVelocity = 70.0;
	MaxAcceleration = 3.0;
	MaxDeceleration = 3.5;
	DoorClosingTime = 5.0;
}
DefineSwitch "■基本設定"{
}
DefineSwitch "電源"{
GroupCommon = "nomtbn20電源";
	Entry = "入";
	Entry = "切";
}
DefineSwitch "■灯火類設定-"{
}
DefineSwitch "前照灯"{
GroupCommon = "nomtbn20前照灯";
	Entry = "自動";
	Entry = "入";
	Entry = "切";
}
DefineSwitch "尾灯"{
GroupCommon = "nomtbn20尾灯";
	Entry = "自動";
	Entry = "入(入替)";
	Entry = "切";
}
DefineSwitch "幕灯"{
GroupCommon = "nomtbn20幕灯";
	Entry = "入";
	Entry = "切";
}
DefineSwitch "運転室灯"{
GroupCommon = "nomtbn20運転室灯";
	Entry = "自動";
	Entry = "入";
	Entry = "切";
}
DefineSwitch "客室照明"{
GroupCommon = "nomtbn20客室灯";
	Entry = "入";
	Entry = "切";
}
DefineSwitch "レンズフレア"{
GroupCommon = "nomtbn20LF";
	Entry = "入";
	Entry = "切";
}
DefineSwitch "■列車設定"{
}
DefineSwitch "行先"{
GroupCommon = "nomtbn20行先";
	Entry = "===-===-===-===-===";
	Entry = "M16-T11-Y16-C18-S24";
	Entry = "M29-T36-Y19-C19-S11";
	Entry = "M30-T12-Y11-C11-S21";
	Entry = "M08-T29-Y21-C23-S20";
	Entry = "M27-T17-Y20-C27-S13";
	Entry = "M15-T33-===-C26-===";
	Entry = "M23-T35-===-C10-===";
	Entry = "M13-===-===-C30-===";
	Entry = "M11-===-===-C15-===";
	Entry = "";
	Entry = "";
	Entry = "回送";
	Entry = "試運転";
	Entry = "臨時";
}
DefineSwitch "■車両設定"{
}
DefineSwitch "編成"{
GroupCommon = "nomtbn20編成";
	Entry = "01";	
	Entry = "02";
	Entry = "03";
	Entry = "04";
	Entry = "05";
	Entry = "06";
	Entry = "07";
	Entry = "08";
	Entry = "09";
	Entry = "10";
	Entry = "11";
	Entry = "12";
	Entry = "13";
	Entry = "14";
	Entry = "15";
	Entry = "16";
	Entry = "17";
	Entry = "18";
	Entry = "19";
	Entry = "20";
	Entry = "21";
	Entry = "22";
	Entry = "51";	
	Entry = "52";
	Entry = "53";
	Entry = "54";
	Entry = "55";
	Entry = "56";
	Entry = "57";
	Entry = "58";
	Entry = "59";
	Entry = "60";
	Entry = "61";
	Entry = "62";
	Entry = "63";
}
DefineSwitch "前面車番サイズ"{
GroupCommon = "nomtbn20前面車番サイズ";
	Entry = "通常";
	Entry = "大(22: 01〜07F | 23: 01〜07,56F | 24: 56F)";
}
DefineSwitch "帯"{
GroupCommon = "nomtbn20帯";
	Entry = "M";
	Entry = "T";
	Entry = "Y";
	Entry = "C";
	Entry = "S";
}
DefineSwitch "連結位置"{
	Entry = "1両目(江坂/八尾南/西梅田/ｺｽﾓｽｸｴｱ/南巽方)";	//2600
	Entry = "4/5/6/9/10両目";				//2900
}
DefineSwitch "遮光幕"{
	Entry = "開";
	Entry = "閉";
}
DefineSwitch "転落防止幌"{
GroupCommon = "nomtbn20転落防止幌";
	Entry = "有(2000〜)";
	Entry = "無";
}
DefineSwitch "ロゴ"{
GroupCommon = "nomtbn20ロゴ";
	Entry = "大阪市交通局";
	Entry = "Osaka Metro(2018.4.1〜)";
}
DefineSwitch "ベビーカーマーク"{
GroupCommon = "nomtbn20ベビーカーマーク";
	Entry = "有(2014.6.18〜)";
	Entry = "無";
}
DefineSwitch "簡易影"{
	GroupCommon = "nomtbn20簡易陰";
	Entry = "入";
	Entry = "切";
}

PrimaryAssembly{

/*---------------------------------------車輪定義ここから---------------------------------------*/

	Axle "wheel1"{
		ModelFileName = "wheel.x";
		CastShadow = no;
		AlphaZeroTest = 0,1;
		Diameter = 0.86;
		Symmetric = 16;
		Coord = (7.3,0.43);
	}
	Axle "wheel2"{
		ModelFileName = "wheel.x";
		CastShadow = no;
		AlphaZeroTest = 0,1;
		Diameter = 0.86;
		Symmetric = 16;
		Coord = (5.1,0.43);
	}
	Axle "wheel3"{
		ModelFileName = "wheel.x";
		CastShadow = no;
		AlphaZeroTest = 0,1;
		Diameter = 0.86;
		Symmetric = 16;

		Coord = (-7.3,0.43);
	}
	Axle "wheel4"{
		ModelFileName = "wheel.x";
		CastShadow = no;
		AlphaZeroTest = 0,1;
		Diameter = 0.86;
		Symmetric = 16;
		Coord = (-5.1,0.43);
	}
/*---------------------------------------車輪定義ここまで---------------------------------------*/

/*---------------------------------------台車定義ここから---------------------------------------*/
	Body "Bogie1"{
		ModelFileName = "bogie_t.x";
		ApplySwitch "帯"{
			Case 1,2,3:
				ApplySwitch "連結位置"{
					Case 0:
						ChangeModel = "../n_omtbn20_1/bogie_m.x", 1.0;
				}
			Case 4:
				ChangeModel = "../n_omtbn20_1/bogie_m.x", 1.0;
		}
		JointZY "wheel1"{
			AttachCoord = (0,0);
			LocalCoord = (1.1, 0.0);
		}
		JointZY "wheel2"{
			AttachCoord = (0,0);
			LocalCoord = (-1.1, 0.0);
		}
	}
	Body "Bogie2"{
		ModelFileName = "bogie_t.x";
		Turn = yes;
		ApplySwitch "帯"{
			Case 1,2,3:
				ApplySwitch "連結位置"{
					Case 0:
						ChangeModel = "../n_omtbn20_1/bogie_m.x", 1.0;
				}
			Case 4:
				ChangeModel = "../n_omtbn20_1/bogie_m.x", 1.0;
		}
		JointZY "wheel3"{
			AttachCoord = (0.0,0.0);
			LocalCoord = (1.1, 0.0);
		}
		JointZY "wheel4"{
			AttachCoord = (0,0);
			LocalCoord = (-1.1, 0.0);
		}
	}
/*---------------------------------------台車定義ここまで---------------------------------------*/

/*---------------------------------------ダミー車体定義ここから---------------------------------------*/
	Body "Dummy"{
		ModelFileName = "";
		JointZY "Bogie1"{
			AttachCoord = (0.0, 0.57);
			LocalCoord = (6.2, 1.0);
		}
		JointZY "Bogie2"{
			AttachCoord = (0.0, 0.57);
			LocalCoord = (-6.2, 1.0);
		}
	}
/*---------------------------------------ダミー車体定義ここまで---------------------------------------*/

/*---------------------------------------車体モデル定義ここから---------------------------------------*/
	Object3D "MainBody"{
		ModelFileName = "body_20900.x";
		Transparent = 9,30;
		If "電源"==0{
			If ("前照灯"==0 && !"_FRONT"&&!"_CONNECT1")||"前照灯"==1{
				ChangeAlpha = 1,1.0;
				NoShadow = 0,1;
　　　　　	　　	}
			If ("尾灯"==0 && "_FRONT"&&!"_CONNECT1")||"尾灯"==1{
				ChangeMaterial{
					MaterialID = 4;
					Emissive = 1.0, 1.0, 1.0;
　　　　　	　　		}
				NoReceiveShadow = 4;
				ShiftTexture = 4, 0.0, -0.03125;
			}
			If "幕灯"==0{
					ChangeMaterial{
						MaterialID = 2,3;
						Emissive = 1.0, 1.0, 1.0;
　　　　　	　　		}
			}
			If "客室照明"==0{
					ChangeMaterial{
						MaterialID = 19,20,21,22,23,24,25,26,27,28;
						Emissive = 1.0, 1.0, 1.0;
　　　　　	　　		}
			}
			If "運転室灯"==1 || ("運転室灯"==0 && "_FRONT"){
					ChangeMaterial{
						MaterialID = 14,15,16,17,18;
						Emissive = 1.0, 1.0, 1.0;
　　　　　	　　		}
			}
		}
		ApplySwitch "遮光幕"{
			Case 1:
				ShiftTexture = 29, 0.25, 0.0;
		}
		ApplySwitch "帯"{
			Case 0:
				ApplySwitch "行先"{
					Case 1:
						ShiftTexture = 2, 0.0, 0.125;
						ShiftTexture = 3, 0.0, 0.125;
					Case 2:
						ShiftTexture = 2, 0.0, 0.25;
						ShiftTexture = 3, 0.0, 0.25;
					Case 3:
						ShiftTexture = 2, 0.0, 0.375;
						ShiftTexture = 3, 0.0, 0.375;
					Case 4:
						ShiftTexture = 2, 0.0, 0.5;
						ShiftTexture = 3, 0.0, 0.5;
					Case 5:
						ShiftTexture = 2, 0.0, 0.625;
						ShiftTexture = 3, 0.0, 0.625;
					Case 6:
						ShiftTexture = 2, 0.0, 0.75;
						ShiftTexture = 3, 0.0, 0.75;
					Case 7:
						ShiftTexture = 2, 0.0, 0.875;
						ShiftTexture = 3, 0.0, 0.875;
					Case 8:
						ShiftTexture = 2, 0.25, 0.0;
						ShiftTexture = 3, 0.25, 0.0;
					Case 9:
						ShiftTexture = 2, 0.25, 0.125;
						ShiftTexture = 3, 0.25, 0.125;
					Case 10:
						ShiftTexture = 2, 0.25, 0.25;
						ShiftTexture = 3, 0.25, 0.25;
					Case 11:
						ShiftTexture = 2, 0.25, 0.375;
						ShiftTexture = 3, 0.25, 0.375;
					Case 12:
						ShiftTexture = 2, 0.25, 0.5;
						ShiftTexture = 3, 0.25, 0.5;
					Case 13:
						ShiftTexture = 2, 0.25, 0.625;
						ShiftTexture = 3, 0.25, 0.625;
					Case 14:
						ShiftTexture = 2, 0.25, 0.75;
						ShiftTexture = 3, 0.25, 0.75;
				}
			Case 1:
				ApplySwitch "行先"{
					Case 1:
						ShiftTexture = 2, 0.5, 0.0;
						ShiftTexture = 3, 0.5, 0.0;
					Case 2:
						ShiftTexture = 2, 0.5, 0.125;
						ShiftTexture = 3, 0.5, 0.125;
					Case 3:
						ShiftTexture = 2, 0.5, 0.25;
						ShiftTexture = 3, 0.5, 0.25;
					Case 4:
						ShiftTexture = 2, 0.5, 0.375;
						ShiftTexture = 3, 0.5, 0.375;
					Case 5:
						ShiftTexture = 2, 0.5, 0.5;
						ShiftTexture = 3, 0.5, 0.5;
					Case 6:
						ShiftTexture = 2, 0.5, 0.625;
						ShiftTexture = 3, 0.5, 0.625;
					Case 7:
						ShiftTexture = 2, 0.5, 0.75;
						ShiftTexture = 3, 0.5, 0.75;
					Case 12:
						ShiftTexture = 2, 0.25, 0.5;
						ShiftTexture = 3, 0.25, 0.5;
					Case 13:
						ShiftTexture = 2, 0.25, 0.625;
						ShiftTexture = 3, 0.25, 0.625;
					Case 14:
						ShiftTexture = 2, 0.25, 0.75;
						ShiftTexture = 3, 0.25, 0.75;
				}
			ShiftTexture = 5, 0.0, 0.15625;
			ShiftTexture = 6, 0.0, 0.15625;
			ShiftTexture = 7, 0.15625, 0.0;
			Case 2:
				ApplySwitch "行先"{
					Case 1:
						ChangeTexture = 2, "tex/幕1.png";
						ChangeTexture = 3, "tex/幕1.png";
					Case 2:
						ChangeTexture = 2, "tex/幕1.png";
						ChangeTexture = 3, "tex/幕1.png";
						ShiftTexture = 2, 0.0, 0.125;
						ShiftTexture = 3, 0.0, 0.125;
					Case 3:
						ChangeTexture = 2, "tex/幕1.png";
						ChangeTexture = 3, "tex/幕1.png";
						ShiftTexture = 2, 0.0, 0.25;
						ShiftTexture = 3, 0.0, 0.25;
					Case 4:
						ChangeTexture = 2, "tex/幕1.png";
						ChangeTexture = 3, "tex/幕1.png";
						ShiftTexture = 2, 0.0, 0.375;
						ShiftTexture = 3, 0.0, 0.375;
					Case 5:
						ChangeTexture = 2, "tex/幕1.png";
						ChangeTexture = 3, "tex/幕1.png";
						ShiftTexture = 2, 0.0, 0.5;
						ShiftTexture = 3, 0.0, 0.5;
					Case 12:
						ShiftTexture = 2, 0.25, 0.5;
						ShiftTexture = 3, 0.25, 0.5;
					Case 13:
						ShiftTexture = 2, 0.25, 0.625;
						ShiftTexture = 3, 0.25, 0.625;
					Case 14:
						ShiftTexture = 2, 0.25, 0.75;
						ShiftTexture = 3, 0.25, 0.75;
				}
			ShiftTexture = 5, 0.0, 0.3125;
			ShiftTexture = 6, 0.0, 0.3125;
			ShiftTexture = 7, 0.3125, 0.0;
			Case 3:
				ApplySwitch "行先"{
					Case 1:
						ShiftTexture = 2, 0.75, 0.0;
						ShiftTexture = 3, 0.75, 0.0;
					Case 2:
						ShiftTexture = 2, 0.75, 0.125;
						ShiftTexture = 3, 0.75, 0.125;
					Case 3:
						ShiftTexture = 2, 0.75, 0.25;
						ShiftTexture = 3, 0.75, 0.25;
					Case 4:
						ShiftTexture = 2, 0.75, 0.375;
						ShiftTexture = 3, 0.75, 0.375;
					Case 5:
						ShiftTexture = 2, 0.75, 0.5;
						ShiftTexture = 3, 0.75, 0.5;
					Case 6:
						ShiftTexture = 2, 0.75, 0.625;
						ShiftTexture = 3, 0.75, 0.625;
					Case 7:
						ShiftTexture = 2, 0.75, 0.75;
						ShiftTexture = 3, 0.75, 0.75;
					Case 8:
						ShiftTexture = 2, 0.75, 0.875;
						ShiftTexture = 3, 0.75, 0.875;
					Case 9:
						ShiftTexture = 2, 0.5, 0.875;
						ShiftTexture = 3, 0.5, 0.875;
					Case 10:
						ShiftTexture = 2, 0.25, 0.875;
						ShiftTexture = 3, 0.25, 0.875;
					Case 12:
						ShiftTexture = 2, 0.25, 0.5;
						ShiftTexture = 3, 0.25, 0.5;
					Case 13:
						ShiftTexture = 2, 0.25, 0.625;
						ShiftTexture = 3, 0.25, 0.625;
					Case 14:
						ShiftTexture = 2, 0.25, 0.75;
						ShiftTexture = 3, 0.25, 0.75;
				}
			ShiftTexture = 5, 0.0, 0.46875;
			ShiftTexture = 6, 0.0, 0.46875;
			ShiftTexture = 7, 0.46875, 0.0;
			Case 4:
				ApplySwitch "行先"{
					Case 1:
						ChangeTexture = 2, "tex/幕1.png";
						ChangeTexture = 3, "tex/幕1.png";
						ShiftTexture = 2, 0.25, 0.0;
						ShiftTexture = 3, 0.25, 0.0;
					Case 2:
						ChangeTexture = 2, "tex/幕1.png";
						ChangeTexture = 3, "tex/幕1.png";
						ShiftTexture = 2, 0.25, 0.125;
						ShiftTexture = 3, 0.25, 0.125;
					Case 3:
						ChangeTexture = 2, "tex/幕1.png";
						ChangeTexture = 3, "tex/幕1.png";
						ShiftTexture = 2, 0.25, 0.25;
						ShiftTexture = 3, 0.25, 0.25;
					Case 4:
						ChangeTexture = 2, "tex/幕1.png";
						ChangeTexture = 3, "tex/幕1.png";
						ShiftTexture = 2, 0.25, 0.375;
						ShiftTexture = 3, 0.25, 0.375;
					Case 5:
						ChangeTexture = 2, "tex/幕1.png";
						ChangeTexture = 3, "tex/幕1.png";
						ShiftTexture = 2, 0.25, 0.5;
						ShiftTexture = 3, 0.25, 0.5;
					Case 12:
						ShiftTexture = 2, 0.25, 0.5;
						ShiftTexture = 3, 0.25, 0.5;
					Case 13:
						ShiftTexture = 2, 0.25, 0.625;
						ShiftTexture = 3, 0.25, 0.625;
					Case 14:
						ShiftTexture = 2, 0.25, 0.75;
						ShiftTexture = 3, 0.25, 0.75;
				}
			ShiftTexture = 5, 0.0, 0.625;
			ShiftTexture = 6, 0.0, 0.625;
			ShiftTexture = 7, 0.625, 0.0;
		}
		If "帯"==3 && ("編成"==33 || "編成"==34){
			ShiftTexture = 5, 0.0, 0.78125;
			ShiftTexture = 6, 0.0, 0.78125;
			ShiftTexture = 7, 0.78125, 0.0;
			ShiftTexture = 8, 0.0, -0.375;
		}
		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
/*---------------------------------------車体モデル定義ここまで---------------------------------------*/

/*---------------------------------------車番定義ここから---------------------------------------*/

	Object3D "number"{
		ModelFileName = "";
		CastShadow = no;
		If "前面車番サイズ"==1{
			ChangeModel = "number_22901.x", 1.0;
		}Else{
			If "帯"==3&& ("編成"==33 || "編成"==34){
				ChangeModel = "number_951.x", 1.0;
			}Else{
				ChangeModel = "number_20900.x", 1.0;
			}
			ChangeModel = "number_20900.x", 1.0;
		}
		ApplySwitch "ロゴ"{
			Case 0:
				ApplySwitch "帯"{
					Case 0:
					Case 1:
						ShiftTexture = 6, 0.0625, 0.0;
					Case 2:
						ShiftTexture = 6, 0.125, 0.0;
					Case 3:
						ShiftTexture = 6, 0.1875, 0.0;
					Case 4:
						ShiftTexture = 6, 0.25, 0.0;
				}
				ChangeAlpha = 7,0.0;
			Case 1:
				If "帯"==3&& ("編成"==33 || "編成"==34){
					ChangeAlpha = 5, 0.0;
				}
				ChangeAlpha = 6,0.0;
				ChangeAlpha = 7,1.0;
		}
		ApplySwitch "帯"{
			Case 0:
				ApplySwitch "連結位置"{
					Case 0:
						ShiftTexture = 1, 0.0, 0.5625;
						ShiftTexture = 3, 0.0, 0.5625;
					Case 1:
				}
			Case 1:
				ApplySwitch "連結位置"{
					Case 0:
						ShiftTexture = 1, 0.0, 0.9375;
						ShiftTexture = 3, 0.0, 0.9375;
					Case 1:
						ShiftTexture = 1, 0.0, 0.625;
						ShiftTexture = 3, 0.0, 0.625;
				}
			Case 2:
				ApplySwitch "連結位置"{
					Case 0:
						ShiftTexture = 1, 0.25, 0.3125;
						ShiftTexture = 3, 0.25, 0.3125;
					Case 1:
						ShiftTexture = 1, 0.25, 0.0;
						ShiftTexture = 3, 0.25, 0.0;
				}
			Case 3:
				ApplySwitch "連結位置"{
					Case 0:
						ShiftTexture = 1, 0.25, 0.6875;
						ShiftTexture = 3, 0.25, 0.6875;
					Case 1:
						ShiftTexture = 1, 0.25, 0.375;
						ShiftTexture = 3, 0.25, 0.375;
				}
			Case 4:
				ApplySwitch "連結位置"{
					Case 0:
						ShiftTexture = 1, 0.25, 0.9375;
						ShiftTexture = 3, 0.25, 0.9375;
					Case 1:
						ShiftTexture = 1, 0.25, 0.75;
						ShiftTexture = 3, 0.25, 0.75;
				}
		}

		ApplySwitch "編成"{
			Case 0:
				
			Case 1:
				ShiftTexture = 2, 0.0, 0.0625;
				ShiftTexture = 4, 0.0, 0.0625;
			Case 2:
				ShiftTexture = 2, 0.0, 0.125;
				ShiftTexture = 4, 0.0, 0.125;
			Case 3:
				ShiftTexture = 2, 0.0, 0.1875;
				ShiftTexture = 4, 0.0, 0.1875;
			Case 4:
				ShiftTexture = 2, 0.0, 0.25;
				ShiftTexture = 4, 0.0, 0.25;
			Case 5:
				ShiftTexture = 2, 0.0, 0.3125;
				ShiftTexture = 4, 0.0, 0.3125;
			Case 6:
				ShiftTexture = 2, 0.0, 0.375;
				ShiftTexture = 4, 0.0, 0.375;
			Case 7:
				ShiftTexture = 2, 0.0, 0.4375;
				ShiftTexture = 4, 0.0, 0.4375;
			Case 8:
				ShiftTexture = 2, 0.0, 0.5;
				ShiftTexture = 4, 0.0, 0.5;
			Case 9:
				ShiftTexture = 2, 0.0, 0.5625;
				ShiftTexture = 4, 0.0, 0.5625;
			Case 10:
				ShiftTexture = 2, 0.0, 0.625;
				ShiftTexture = 4, 0.0, 0.625;
			Case 11:
				ShiftTexture = 2, 0.0, 0.6875;
				ShiftTexture = 4, 0.0, 0.6875;
			Case 12:
				ShiftTexture = 2, 0.0, 0.75;
				ShiftTexture = 4, 0.0, 0.75;
			Case 13:
				ShiftTexture = 2, 0.0, 0.8125;
				ShiftTexture = 4, 0.0, 0.8125;
			Case 14:
				ShiftTexture = 2, 0.0, 0.875;
				ShiftTexture = 4, 0.0, 0.875;
			Case 15:
				ShiftTexture = 2, 0.0, 0.9375;
				ShiftTexture = 4, 0.0, 0.9375;
			Case 16:
				ShiftTexture = 2, 0.25, 0.0;
				ShiftTexture = 4, 0.25, 0.0;
			Case 17:
				ShiftTexture = 2, 0.25, 0.0625;
				ShiftTexture = 4, 0.25, 0.0625;
			Case 18:
				ShiftTexture = 2, 0.25, 0.125;
				ShiftTexture = 4, 0.25, 0.125;
			Case 19:
				ShiftTexture = 2, 0.25, 0.1875;
				ShiftTexture = 4, 0.25, 0.1875;
			Case 20:
				ShiftTexture = 2, 0.25, 0.25;
				ShiftTexture = 4, 0.25, 0.25;
			Case 21:
				ShiftTexture = 2, 0.25, 0.3125;
				ShiftTexture = 4, 0.25, 0.3125;
			Case 22:
				ShiftTexture = 2, 0.25, 0.375;
				ShiftTexture = 4, 0.25, 0.375;
			Case 23:
				ShiftTexture = 2, 0.25, 0.4375;
				ShiftTexture = 4, 0.25, 0.4375;
			Case 24:
				ShiftTexture = 2, 0.25, 0.5;
				ShiftTexture = 4, 0.25, 0.5;
			Case 25:
				ShiftTexture = 2, 0.25, 0.5625;
				ShiftTexture = 4, 0.25, 0.5625;
			Case 26:
				ShiftTexture = 2, 0.25, 0.625;
				ShiftTexture = 4, 0.25, 0.625;
			Case 27:
				ShiftTexture = 2, 0.25, 0.6875;
				ShiftTexture = 4, 0.25, 0.6875;
			Case 28:
				ShiftTexture = 2, 0.25, 0.75;
				ShiftTexture = 4, 0.25, 0.75;
			Case 29:
				ShiftTexture = 2, 0.25, 0.8125;
				ShiftTexture = 4, 0.25, 0.8125;
			Case 30:
				ShiftTexture = 2, 0.25, 0.875;
				ShiftTexture = 4, 0.25, 0.875;
			Case 31:
				ShiftTexture = 2, 0.25, 0.9375;
				ShiftTexture = 4, 0.25, 0.9375;
			Case 32:
				ShiftTexture = 2, 0.5, 0.0;
				ShiftTexture = 4, 0.5, 0.0;
			Case 33:
				ShiftTexture = 2, 0.5, 0.0625;
				ShiftTexture = 4, 0.5, 0.0625;
			Case 34:
				ShiftTexture = 2, 0.5, 0.125;
				ShiftTexture = 4, 0.5, 0.125;
		}
		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
/*---------------------------------------車番定義ここまで---------------------------------------*/

/*---------------------------------------ステッカー定義ここから---------------------------------------*/
	Object3D "sticker"{
		ModelFileName = "sticker_20900.x";
		CastShadow = no;
		ChangeAlpha = 2,0.0;
		ApplySwitch "ベビーカーマーク"{
			Case 1:
				ChangeAlpha = 1,0.0;
		}
		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
/*---------------------------------------ステッカー定義ここまで---------------------------------------*/

/*---------------------------------------前面窓定義ここから---------------------------------------*/

	Object3D "window"{
		ModelFileName = "window_20900.x";
		CastShadow = no;
		Transparent = 0;
		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
/*---------------------------------------前面窓定義ここまで---------------------------------------*/

/*---------------------------------------床下モデル定義ここから---------------------------------------*/
	Object3D "yuka"{
		ModelFileName = "yuka_20600.x";
		ApplySwitch "連結位置"{
			Case 1:
				StaticRotation{
					RotationAxis = (0.0, 1.0, 0.0);
					RotationAngle = 180;
				}
		}
		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
/*---------------------------------------床下モデル定義ここまで---------------------------------------*/

/*---------------------------------------連結器モデル定義ここから---------------------------------------*/
	Object3D "yuka_c"{
		ModelFileName = "yuka_g.x";
		ApplySwitch "帯"{
			Case 1,3,4:
				ChangeModel = "yuka_f.x", 1.0;
		}
		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
/*---------------------------------------連結器モデル定義ここまで---------------------------------------*/

/*---------------------------------------転防モデル定義ここから---------------------------------------*/
	Object3D "Horo-z"{
		ModelFileName = "";
		ApplySwitch "転落防止幌"{
			Case 0:
				ChangeModel = "horo.x", 1.0;
		}
		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
/*---------------------------------------転防モデル定義ここまで---------------------------------------*/

/*---------------------------------------扉モデル定義ここから---------------------------------------*/
	Object3D "Doorll"{
		ModelFileName = "Doorl.x";
		Transparent = 4;
		If "電源"==0 && "客室照明"==0{
			ChangeMaterial{
				MaterialID = 0,1;
				Emissive = 1.0, 1.0, 1.0;
			}
　　　　　　　　}
		If "_DOOR1"{
			StaticMove{
				Displacement = (0.0, 0.0, 0.6);
				PreAnimationDelay = 1.0;
				AnimationTime = 1.5;
				 PreReverseDelay = 0.5;
				ReverseTime = 1.5;
			}
			StaticMove{
				Displacement = (0.0, 0.0, 0.05);
				PreAnimationDelay = 2.5;
				AnimationTime = 0.5;
				 PreReverseDelay = 2.0;
				ReverseTime = 0.5;
			}
		}
		ApplySwitch "帯"{
			Case 1:
				ShiftTexture = 2, 0.09375, 0.0;
			Case 2:
				ShiftTexture = 2, 0.1875, 0.0;
			Case 3:
				ShiftTexture = 2, 0.28125, 0.0;
			Case 4:
				ShiftTexture = 2, 0.375, 0.0;
		}
		If "帯"==3 && ("編成"==33 || "編成"==34){
			ShiftTexture = 2, 0.46875, 0.0;
		}
		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}

	Object3D "Doorlr"{
		ModelFileName = "Doorr.x";
		Transparent = 4;
		If "電源"==0 && "客室照明"==0{
			ChangeMaterial{
				MaterialID = 0,1;
				Emissive = 1.0, 1.0, 1.0;
			}
　　　　　　　　}
		If "_DOOR1" {
			StaticMove{
				Displacement = (0.0, 0.0, -0.6);
				PreAnimationDelay = 1.0;
				AnimationTime = 1.5;
				 PreReverseDelay = 0.5;
				ReverseTime = 1.5;
			}
			StaticMove{
				Displacement = (0.0, 0.0, -0.05);
				PreAnimationDelay = 2.5;
				AnimationTime = 0.5;
				 PreReverseDelay = 2.0;
				ReverseTime = 0.5;
			}
		}
		ApplySwitch "帯"{
			Case 1:
				ShiftTexture = 2, 0.09375, 0.0;
			Case 2:
				ShiftTexture = 2, 0.1875, 0.0;
			Case 3:
				ShiftTexture = 2, 0.28125, 0.0;
			Case 4:
				ShiftTexture = 2, 0.375, 0.0;
		}
		If "帯"==3 && ("編成"==33 || "編成"==34){
			ShiftTexture = 2, 0.46875, 0.0;
		}
		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
	Object3D "Doorrl"{
		ModelFileName = "Doorr.x";
		Transparent = 4;
		If "電源"==0 && "客室照明"==0{
			ChangeMaterial{
				MaterialID = 0,1;
				Emissive = 1.0, 1.0, 1.0;
			}
　　　　　　　　}
		If "_DOOR2"{
			StaticMove{
				Displacement = (0.0, 0.0, -0.6);
				PreAnimationDelay = 1.0;
				AnimationTime = 1.5;
				 PreReverseDelay = 0.5;
				ReverseTime = 1.5;
			}
			StaticMove{
				Displacement = (0.0, 0.0, -0.05);
				PreAnimationDelay = 2.5;
				AnimationTime = 0.5;
				 PreReverseDelay = 2.0;
				ReverseTime = 0.5;
			}
		}
		ApplySwitch "帯"{
			Case 1:
				ShiftTexture = 2, 0.09375, 0.0;
			Case 2:
				ShiftTexture = 2, 0.1875, 0.0;
			Case 3:
				ShiftTexture = 2, 0.28125, 0.0;
			Case 4:
				ShiftTexture = 2, 0.375, 0.0;
		}
		If "帯"==3 && ("編成"==33 || "編成"==34){
			ShiftTexture = 2, 0.46875, 0.0;
		}
		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
			AttachDir = (0.0, 0.0, -1.0);
		}
	}

	Object3D "Doorrr"{
		ModelFileName = "Doorl.x";
		Transparent = 4;
		If "電源"==0 && "客室照明"==0{
			ChangeMaterial{
				MaterialID = 0,1;
				Emissive = 1.0, 1.0, 1.0;
			}
　　　　　　　　}
		If "_DOOR2" {
			StaticMove{
				Displacement = (0.0, 0.0, 0.6);
				PreAnimationDelay = 1.0;
				AnimationTime = 1.5;
				 PreReverseDelay = 0.5;
				ReverseTime = 1.5;
			}
			StaticMove{
				Displacement = (0.0, 0.0, 0.05);
				PreAnimationDelay = 2.5;
				AnimationTime = 0.5;
				 PreReverseDelay = 2.0;
				ReverseTime = 0.5;
			}
		}
		ApplySwitch "帯"{
			Case 1:
				ShiftTexture = 2, 0.09375, 0.0;
			Case 2:
				ShiftTexture = 2, 0.1875, 0.0;
			Case 3:
				ShiftTexture = 2, 0.28125, 0.0;
			Case 4:
				ShiftTexture = 2, 0.375, 0.0;
		}
		If "帯"==3 && ("編成"==33 || "編成"==34){
			ShiftTexture = 2, 0.46875, 0.0;
		}
		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
			AttachDir = (0.0, 0.0, -1.0);
		}
	}
/*---------------------------------------扉モデル定義ここまで---------------------------------------*/

/*---------------------------------------戸閉灯モデル定義ここから---------------------------------------*/
	Object3D "Doorl"{
		ModelFileName = "tojime.x";
		StaticRotation{
			RotationAxis = (0.0, 1.0, 0.0);
			RotationAngle = 180;
		}
		If "_DOOR2"{
			StaticRotation{
				RotationAxis = (0.0, 1.0, 0.0);
				RotationAngle = 180;
				PreAnimationDelay = 1.0;
				AnimationTime = 0.0;
				 PreReverseDelay = 2.5;
				ReverseTime = 0.0;
			}
		}
		Joint3D "MainBody"{
			AttachCoord = (1.41, 3.14, -0.43);
		}
	}
	Object3D "Doorr"{
		ModelFileName = "tojime.x";
		If "_DOOR1"{
			StaticRotation{
				RotationAxis = (0.0, 1.0, 0.0);
				RotationAngle = 180;
				PreAnimationDelay = 1.0;
				AnimationTime = 0.0;
				 PreReverseDelay = 2.5;
				ReverseTime = 0.0;
			}
		}
		Joint3D "MainBody"{
			AttachCoord = (-1.41, 3.14, 0.43);
		}
	}
/*---------------------------------------戸閉灯モデル定義ここまで---------------------------------------*/

/*---------------------------------------簡易影モデル定義ここから---------------------------------------*/
	Object3D "Shadow"{
		ModelFileName = "Shadow.x";
		CastShadow = no;
		NoCastShadow = 0;
		ApplySwitch "簡易影"{
			Case 1:
				ChangeModel = "", 1.0;
		}
		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
/*---------------------------------------簡易影モデル定義ここまで---------------------------------------*/

	If "電源"==0 && (("前照灯"==0 && !"_FRONT")|| "前照灯"==1) && "レンズフレア"==0 && !"_CONNECT1" {
			Headlight{
			    AttachObject = "Dummy";
			    SourceCoord = (0.13, 1.84, 9.14);
			    Direction = (0.0, 0.0, 1.0);
			    MaxDistance = 10.0;
				LensFlare{
				    StartAngle = 90.0;
				    Twinkle = 0.1;
					Texture{
					    Distance = 0.005;
					    Radius = 0.5;
					    TexFileName = "tex/フレア.png";
					    Color = #FFe2d4b4;
					}
				}
			}
			Headlight{
			    AttachObject = "Dummy";
			    SourceCoord = (-0.13, 1.84, 9.14);
			    Direction = (0.0, 0.0, 1.0);
			    MaxDistance = 10.0;
			}
	}
	If "電源"==0 && (("尾灯"==0 && "_FRONT")|| "尾灯"==1) && "レンズフレア"==0 && !"_CONNECT1" {
		Headlight{
		    AttachObject = "Dummy";
		    SourceCoord = (1.375, 2.72, 9.13);
		    Direction = (0.0, 0.0, 1.0);
		    MaxDistance = 10.0;
			LensFlare{
			    StartAngle = 30.0;
			    Twinkle = 0.1;
				Texture{
				    Distance = 0.005;
				    Radius = 0.5;
				    TexFileName = "tex/フレア1.png";
				    Color = #FFd20046;
				}
			}
		}
		Headlight{
		    AttachObject = "Dummy";
		    SourceCoord = (-1.375, 2.72, 9.13);
		    Direction = (0.0, 0.0, 1.0);
		    MaxDistance = 10.0;
		}
	}
	FrontCabin{
		Joint3D "MainBody"{
			AttachCoord = (0.0,0.0,0.0);
		}
	}
}

