
PluginHeader{
	RailSimVersion = 2.00;
	PluginType = Train;
	PluginName = "大交新20更新車素材 中間車(k)";
	PluginAuthor = "n";
	IconTexture = "icon.png";
}
TrainInfo{
	FrontLimit = 9.35;
	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 = "切";
}
DefineSwitch "客室照明"{
GroupCommon = "nomtbn20客室灯";
	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 = "M";
	Entry = "T";
	Entry = "Y";
	Entry = "C";
	Entry = "S";
}
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 = "";	
	Entry = "";
	Entry = "";
	Entry = "";
	Entry = "";
	Entry = "56";
	Entry = "";	
	Entry = "";
	Entry = "";
	Entry = "";
	Entry = "";
	Entry = "";
	Entry = "";
}
DefineSwitch "連結位置"{										/*  M  / TYC /  S  */
	Entry = "2両目(江坂/八尾南/西梅田/ｺｽﾓｽｸｴｱ/南巽方)";	/* 000 / 100 / 100 */
	Entry = "3両目";					/* 100 /(800)/ 300 */
	Entry = "4両目";					/* 700 / 300 */	
	Entry = "5両目";					/* 400 / 200 */
	Entry = "6両目";					/* 800 */
	Entry = "7両目";					/* 500 */
	Entry = "8両目";					/* 300 */
	Entry = "9両目";					/* 200 */
}
DefineSwitch "転落防止幌"{
GroupCommon = "nomtbn20転落防止幌";
	Entry = "有(2000〜)";
	Entry = "無";
	Entry = "無(中間車間)";
}
DefineSwitch "女性専用車"{
GroupCommon = "nomtbn20女性専用車";
	Entry = "ラッピング無";
	Entry = "ラッピング-1";
	Entry = "ラッピング-2";
	Entry = "ラッピング-3";
}
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 = "../n_omtbn20_1/wheel.x";
		CastShadow = no;
		AlphaZeroTest = 0,1;
		ChangeMaterial{
			MaterialID = 0;
			Diffuse = 0.6, 0.6, 0.6, 1.0;
			Ambient = 0.3, 0.3, 0.3;
　　　　　	}
		ChangeMaterial{
			MaterialID = 1;
			Diffuse = 0.3, 0.3, 0.3, 1.0;
			Ambient = 0.1, 0.1, 0.1;
　　　　　	}
		ChangeMaterial{
			MaterialID = 2;
			Diffuse = 0.6, 0.6, 0.6, 1.0;
　　　　　	}
		BumpMap = 0,1,2;
		EnvMap = 0,1,2;
		ChangeTexture = 0, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 1, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 2, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 0, "../n_omtbn20_1/tex/yo.png", pbr;
		ChangeTexture = 1, "../n_omtbn20_1/tex/yo.png", pbr;
		ChangeTexture = 2, "../n_omtbn20_1/tex/ho.png", pbr;
		Diameter = 0.86;
		Symmetric = 16;
		Coord = (6.85,0.43);
	}
	Axle "wheel2"{
		ModelFileName = "../n_omtbn20_1/wheel.x";
		CastShadow = no;
		AlphaZeroTest = 0,1;
		ChangeMaterial{
			MaterialID = 0;
			Diffuse = 0.6, 0.6, 0.6, 1.0;
			Ambient = 0.3, 0.3, 0.3;
　　　　　	}
		ChangeMaterial{
			MaterialID = 1;
			Diffuse = 0.3, 0.3, 0.3, 1.0;
			Ambient = 0.1, 0.1, 0.1;
　　　　　	}
		ChangeMaterial{
			MaterialID = 2;
			Diffuse = 0.6, 0.6, 0.6, 1.0;
　　　　　	}
		BumpMap = 0,1,2;
		EnvMap = 0,1,2;
		ChangeTexture = 0, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 1, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 2, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 0, "../n_omtbn20_1/tex/yo.png", pbr;
		ChangeTexture = 1, "../n_omtbn20_1/tex/yo.png", pbr;
		ChangeTexture = 2, "../n_omtbn20_1/tex/ho.png", pbr;
		Diameter = 0.86;
		Symmetric = 16;
		Coord = (4.65,0.43);
	}
	Axle "wheel3"{
		ModelFileName = "../n_omtbn20_1/wheel.x";
		CastShadow = no;
		AlphaZeroTest = 0,1;
		ChangeMaterial{
			MaterialID = 0;
			Diffuse = 0.6, 0.6, 0.6, 1.0;
			Ambient = 0.3, 0.3, 0.3;
　　　　　	}
		ChangeMaterial{
			MaterialID = 1;
			Diffuse = 0.3, 0.3, 0.3, 1.0;
			Ambient = 0.1, 0.1, 0.1;
　　　　　	}
		ChangeMaterial{
			MaterialID = 2;
			Diffuse = 0.6, 0.6, 0.6, 1.0;
　　　　　	}
		BumpMap = 0,1,2;
		EnvMap = 0,1,2;
		ChangeTexture = 0, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 1, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 2, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 0, "../n_omtbn20_1/tex/yo.png", pbr;
		ChangeTexture = 1, "../n_omtbn20_1/tex/yo.png", pbr;
		ChangeTexture = 2, "../n_omtbn20_1/tex/ho.png", pbr;
		Diameter = 0.86;
		Symmetric = 16;

		Coord = (-6.85,0.43);
	}
	Axle "wheel4"{
		ModelFileName = "../n_omtbn20_1/wheel.x";
		CastShadow = no;
		AlphaZeroTest = 0,1;
		ChangeMaterial{
			MaterialID = 0;
			Diffuse = 0.6, 0.6, 0.6, 1.0;
			Ambient = 0.3, 0.3, 0.3;
　　　　　	}
		ChangeMaterial{
			MaterialID = 1;
			Diffuse = 0.3, 0.3, 0.3, 1.0;
			Ambient = 0.1, 0.1, 0.1;
　　　　　	}
		ChangeMaterial{
			MaterialID = 2;
			Diffuse = 0.6, 0.6, 0.6, 1.0;
　　　　　	}
		BumpMap = 0,1,2;
		EnvMap = 0,1,2;
		ChangeTexture = 0, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 1, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 2, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 0, "../n_omtbn20_1/tex/yo.png", pbr;
		ChangeTexture = 1, "../n_omtbn20_1/tex/yo.png", pbr;
		ChangeTexture = 2, "../n_omtbn20_1/tex/ho.png", pbr;
		Diameter = 0.86;
		Symmetric = 16;
		Coord = (-4.65,0.43);
	}
	Body "Bogie1"{
		ModelFileName = "../n_omtbn20_1/bogie_t.x";
		ApplySwitch "帯"{
			Case 0:
				ApplySwitch "連結位置"{
					Case 0,2,3,6,7:
						ChangeModel = "../n_omtbn20_1/bogie_m.x", 1.0;
				}
			Case 1,2,3:
				ApplySwitch "連結位置"{
					Case 2,3:
						ChangeModel = "../n_omtbn20_1/bogie_m.x", 1.0;
				}
			Case 4:
				ApplySwitch "連結位置"{
					Case 1:
						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 = "../n_omtbn20_1/bogie_t.x";
		Turn = yes;
		ApplySwitch "帯"{
			Case 0:
				ApplySwitch "連結位置"{
					Case 0,1,3,7:
						ChangeModel = "../n_omtbn20_1/bogie_m.x", 1.0;
				}
			Case 1,2,3:
				ApplySwitch "連結位置"{
					Case 0,3:
						ChangeModel = "../n_omtbn20_1/bogie_m.x", 1.0;
				}
			Case 4:
				ApplySwitch "連結位置"{
					Case 0:
						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 = "";
		ModelScale = 1.0;
		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 = "../n_omtbn20n_1/body_20200r.x";
		Transparent = 9,30;

		If "帯"==0 && "連結位置"==3{
			ApplySwitch "女性専用車"{
				Case 1:
					ChangeModel = "../n_omtbn20n_1/body_21400.x", 1.0;
				Case 2:
					ChangeModel = "../n_omtbn20n_1/body_21400.x", 1.0;
					ShiftTexture = 5, 0.0, 0.3125;
				Case 3:
					ChangeModel = "../n_omtbn20n_1/body_21400.x", 1.0;
					ShiftTexture = 5, 0.0, 0.625;
			}
		}


		//照明定義ここから

		If "電源"==0{
			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;
　　　　　	　　		}
			}
		}

		//照明定義ここまで


		//帯定義ここから

		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, "../n_omtbn20n_1/tex/幕3.png";
						ChangeTexture = 3, "../n_omtbn20n_1/tex/幕3.png";
					Case 2:
						ChangeTexture = 2, "../n_omtbn20n_1/tex/幕3.png";
						ChangeTexture = 3, "../n_omtbn20n_1/tex/幕3.png";
						ShiftTexture = 2, 0.0, 0.125;
						ShiftTexture = 3, 0.0, 0.125;
					Case 3:
						ChangeTexture = 2, "../n_omtbn20n_1/tex/幕3.png";
						ChangeTexture = 3, "../n_omtbn20n_1/tex/幕3.png";
						ShiftTexture = 2, 0.0, 0.25;
						ShiftTexture = 3, 0.0, 0.25;
					Case 4:
						ChangeTexture = 2, "../n_omtbn20n_1/tex/幕3.png";
						ChangeTexture = 3, "../n_omtbn20n_1/tex/幕3.png";
						ShiftTexture = 2, 0.0, 0.375;
						ShiftTexture = 3, 0.0, 0.375;
					Case 5:
						ChangeTexture = 2, "../n_omtbn20n_1/tex/幕3.png";
						ChangeTexture = 3, "../n_omtbn20n_1/tex/幕3.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, "../n_omtbn20n_1/tex/幕3.png";
						ChangeTexture = 3, "../n_omtbn20n_1/tex/幕3.png";
						ShiftTexture = 2, 0.25, 0.0;
						ShiftTexture = 3, 0.25, 0.0;
					Case 2:
						ChangeTexture = 2, "../n_omtbn20n_1/tex/幕3.png";
						ChangeTexture = 3, "../n_omtbn20n_1/tex/幕3.png";
						ShiftTexture = 2, 0.25, 0.125;
						ShiftTexture = 3, 0.25, 0.125;
					Case 3:
						ChangeTexture = 2, "../n_omtbn20n_1/tex/幕3.png";
						ChangeTexture = 3, "../n_omtbn20n_1/tex/幕3.png";
						ShiftTexture = 2, 0.25, 0.25;
						ShiftTexture = 3, 0.25, 0.25;
					Case 4:
						ChangeTexture = 2, "../n_omtbn20n_1/tex/幕3.png";
						ChangeTexture = 3, "../n_omtbn20n_1/tex/幕3.png";
						ShiftTexture = 2, 0.25, 0.375;
						ShiftTexture = 3, 0.25, 0.375;
					Case 5:
						ChangeTexture = 2, "../n_omtbn20n_1/tex/幕3.png";
						ChangeTexture = 3, "../n_omtbn20n_1/tex/幕3.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;
		}

		//帯定義ここまで

		//帯（側面号車表示）定義ここから

		ApplySwitch "帯"{
			Case 0:
				ApplySwitch "連結位置"{
					Case 0:
						ShiftTexture = 34, 0.5, 0.0;
					Case 1:
						ShiftTexture = 34, 0.4375, 0.0;
					Case 2:
						ShiftTexture = 34, 0.375, 0.0;
					Case 3:
						ShiftTexture = 34, 0.3125, 0.0;
					Case 4:
						ShiftTexture = 34, 0.25, 0.0;
					Case 5:
						ShiftTexture = 34, 0.1875, 0.0;
					Case 6:
						ShiftTexture = 34, 0.125, 0.0;
					Case 7:
						ShiftTexture = 34, 0.0625, 0.0;
				}
			Case 1:
				ApplySwitch "連結位置"{
					Case 0:
						ShiftTexture = 34, 0.0625, 0.15625;
					Case 1:
						ShiftTexture = 34, 0.125, 0.15625;
					Case 2:
						ShiftTexture = 34, 0.1875, 0.15625;
					Case 3:
						ShiftTexture = 34, 0.25, 0.15625;
				}
			Case 2:
				ApplySwitch "連結位置"{
					Case 0:
						ShiftTexture = 34, 0.25, 0.3125;
					Case 1:
						ShiftTexture = 34, 0.1875, 0.3125;
					Case 2:
						ShiftTexture = 34, 0.125, 0.3125;
					Case 3:
						ShiftTexture = 34, 0.0625, 0.3125;
				}
			Case 3:
				ApplySwitch "連結位置"{
					Case 0:
						ShiftTexture = 34, 0.25, 0.46875;
					Case 1:
						ShiftTexture = 34, 0.1875, 0.46875;
					Case 2:
						ShiftTexture = 34, 0.125, 0.46875;
					Case 3:
						ShiftTexture = 34, 0.0625, 0.46875;
				}
			Case 4:
				ApplySwitch "連結位置"{
					Case 0:
						ShiftTexture = 34, 0.0625, 0.625;
					Case 1:
						ShiftTexture = 34, 0.125, 0.625;
				}
		}

		//帯（側面号車表示）定義ここまで


		//PBR定義ここから

		If "帯"==0 && "連結位置"==3 && "女性専用車">0{
			BumpMap = 5,6,10,11,12,30,33;
			EnvMap = 5,6,10,11,12,30,33;
			ChangeTexture = 5, "../n_omtbn20n_1/tex/車体_21400n.png", normal;
			ChangeTexture = 6, "../n_omtbn20_1/tex/車体_20900n.png", normal;
			ChangeTexture = 10, "../n_omtbn20_1/tex/n.png", normal;
			ChangeTexture = 11, "../n_omtbn20_1/tex/車内_101n.png", normal;
			ChangeTexture = 12, "../n_omtbn20_1/tex/n.png", normal;
			ChangeTexture = 30, "../n_omtbn20_1/tex/n.png", normal;
			ChangeTexture = 33, "../n_omtbn20_1/tex/n.png", normal;

			ChangeTexture = 5, "../n_omtbn20n_1/tex/車体_21400o.png", pbr;
			ChangeTexture = 6, "../n_omtbn20_1/tex/車体_20900o.png", pbr;
			ChangeTexture = 10, "../n_omtbn20_1/tex/妻面_0o.png", pbr;
			ChangeTexture = 11, "../n_omtbn20_1/tex/車内_101o.png", pbr;
			ChangeTexture = 12, "../n_omtbn20_1/tex/ho.png", pbr;
			ChangeTexture = 30, "../n_omtbn20_1/tex/wo.png", pbr;
			ChangeTexture = 33, "../n_omtbn20_1/tex/#CCCCCC.png", pbr;

			ChangeMaterial{
				MaterialID = 6,10,11,12,33,34;
				Diffuse = 1.5, 1.5, 1.5, 1.0;
				Ambient = 1.0, 1.0, 1.0;
　　　　　		}
		}Else{
			BumpMap = 5,6,10,11,12,30,33,34;
			EnvMap = 5,6,10,11,12,30,33,34;
			ChangeTexture = 5, "../n_omtbn20_1/tex/車体_20900n.png", normal;
			ChangeTexture = 6, "../n_omtbn20n_1/tex/車体3n.png", normal;
			ChangeTexture = 10, "../n_omtbn20_1/tex/n.png", normal;
			ChangeTexture = 11, "../n_omtbn20_1/tex/車内_101n.png", normal;
			ChangeTexture = 12, "../n_omtbn20_1/tex/n.png", normal;
			ChangeTexture = 30, "../n_omtbn20_1/tex/n.png", normal;
			ChangeTexture = 33, "../n_omtbn20_1/tex/n.png", normal;
			ChangeTexture = 34, "../n_omtbn20n_1/tex/車体3n.png", normal;

			ChangeTexture = 5, "../n_omtbn20_1/tex/車体_20900o.png", pbr;
			ChangeTexture = 6, "../n_omtbn20n_1/tex/車体3o.png", pbr;
			ChangeTexture = 10, "../n_omtbn20_1/tex/妻面_0o.png", pbr;
			ChangeTexture = 11, "../n_omtbn20_1/tex/車内_101o.png", pbr;
			ChangeTexture = 12, "../n_omtbn20_1/tex/ho.png", pbr;
			ChangeTexture = 30, "../n_omtbn20_1/tex/wo.png", pbr;
			ChangeTexture = 33, "../n_omtbn20_1/tex/#CCCCCC.png", pbr;
			ChangeTexture = 34, "../n_omtbn20n_1/tex/車体3o.png", pbr;

			ChangeMaterial{
				MaterialID = 5,6,10,11,12,33,34;
				Diffuse = 1.5, 1.5, 1.5, 1.0;
				Ambient = 1.0, 1.0, 1.0;
　　　　　		}
		}
		//PBR定義ここまで

		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
/*---------------------------------------車体モデル定義ここまで---------------------------------------*/

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

	Object3D "number"{
		ModelFileName = "../n_omtbn20n_1/number_20200r.x";
		CastShadow = no;
		BumpMap = 0,1,2,3,4,5,6,7;
		EnvMap = 0,1,2,3,4,5,6,7;
		ChangeTexture = 0, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 1, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 2, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 3, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 4, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 5, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 6, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 7, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 0, "../n_omtbn20_1/tex/wo.png", pbr;
		ChangeTexture = 1, "../n_omtbn20_1/tex/wo.png", pbr;
		ChangeTexture = 2, "../n_omtbn20_1/tex/wo.png", pbr;
		ChangeTexture = 3, "../n_omtbn20_1/tex/wo.png", pbr;
		ChangeTexture = 4, "../n_omtbn20_1/tex/wo.png", pbr;
		ChangeTexture = 5, "../n_omtbn20_1/tex/wo.png", pbr;
		ChangeTexture = 6, "../n_omtbn20_1/tex/wo.png", pbr;
		ChangeTexture = 7, "../n_omtbn20_1/tex/wo.png", pbr;
		ChangeMaterial{
			MaterialID = 0;
			Diffuse = 1.0, 1.0, 1.0, 1.0;
			Ambient = 1.0, 1.0, 1.0;
　　　	}

		//ロゴ・帯色定義ここから

		ApplySwitch "ロゴ"{
			Case 0:
				ApplySwitch "帯"{
					Case 0:
						If "女性専用車">0 && "連結位置"==3 {
							ChangeAlpha = 6,0.0;
							ChangeAlpha = 7,0.0;
						}Else{
							ChangeMaterial{
								MaterialID = 3,4,5,6;
								Diffuse = 1.5, 1.5, 1.5, 1.0;
								Ambient = 1.0, 1.0, 1.0;
　　　　　						}
							ChangeAlpha = 7,0.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;
					Case 1,2,3,4:
						ChangeMaterial{
							MaterialID = 3,4,5,6;
							Diffuse = 1.5, 1.5, 1.5, 1.0;
							Ambient = 1.0, 1.0, 1.0;
　　　　　					}
				}
				ChangeAlpha = 7,0.0;
			Case 1:
				If "女性専用車">0 && "連結位置"==3 {
					ChangeAlpha = 7,0.0;
				}Else{
					ChangeMaterial{
						MaterialID = 7;
						Diffuse = 1.0, 1.0, 1.0, 1.0;
						Ambient = 1.0, 1.0, 1.0;
　　　　　				}
				}
				ChangeAlpha = 6,0.0;
		}

		//ロゴ・帯色定義ここまで


		//車番（号車）定義ここから

		ApplySwitch "帯"{
			Case 0:
				ApplySwitch "連結位置"{
					Case 0:
						ShiftTexture = 1, 0.0, 0.5;
						ShiftTexture = 3, 0.0, 0.5;
					Case 1:
						ShiftTexture = 1, 0.0, 0.4375;
						ShiftTexture = 3, 0.0, 0.4375;
					Case 2:
						ShiftTexture = 1, 0.0, 0.375;
						ShiftTexture = 3, 0.0, 0.375;
					Case 3:
						ShiftTexture = 1, 0.0, 0.3125;
						ShiftTexture = 3, 0.0, 0.3125;
					Case 4:
						ShiftTexture = 1, 0.0, 0.25;
						ShiftTexture = 3, 0.0, 0.25;
					Case 5:
						ShiftTexture = 1, 0.0, 0.1875;
						ShiftTexture = 3, 0.0, 0.1875;
					Case 6:
						ShiftTexture = 1, 0.0, 0.125;
						ShiftTexture = 3, 0.0, 0.125;
					Case 7:
						ShiftTexture = 1, 0.0, 0.0625;
						ShiftTexture = 3, 0.0, 0.0625;
				}
			Case 1:
				ApplySwitch "連結位置"{
					Case 0:
						ShiftTexture = 1, 0.0, 0.875;
						ShiftTexture = 3, 0.0, 0.875;
					Case 1:
						ShiftTexture = 1, 0.0, 0.8125;
						ShiftTexture = 3, 0.0, 0.8125;
					Case 2:
						ShiftTexture = 1, 0.0, 0.75;
						ShiftTexture = 3, 0.0, 0.75;
					Case 3:
						ShiftTexture = 1, 0.0, 0.6875;
						ShiftTexture = 3, 0.0, 0.6875;
				}
			Case 2:
				ApplySwitch "連結位置"{
					Case 0:
						ShiftTexture = 1, 0.25, 0.25;
						ShiftTexture = 3, 0.25, 0.25;
					Case 1:
						ShiftTexture = 1, 0.25, 0.1875;
						ShiftTexture = 3, 0.25, 0.1875;
					Case 2:
						ShiftTexture = 1, 0.25, 0.125;
						ShiftTexture = 3, 0.25, 0.125;
					Case 3:
						ShiftTexture = 1, 0.25, 0.0625;
						ShiftTexture = 3, 0.25, 0.0625;
				}
			Case 3:
				ApplySwitch "連結位置"{
					Case 0:
						ShiftTexture = 1, 0.25, 0.625;
						ShiftTexture = 3, 0.25, 0.625;
					Case 1:
						ShiftTexture = 1, 0.25, 0.5625;
						ShiftTexture = 3, 0.25, 0.5625;
					Case 2:
						ShiftTexture = 1, 0.25, 0.5;
						ShiftTexture = 3, 0.25, 0.5;
					Case 3:
						ShiftTexture = 1, 0.25, 0.43725;
						ShiftTexture = 3, 0.25, 0.4375;
				}
			Case 4:
				ApplySwitch "連結位置"{
					Case 0:
						ShiftTexture = 1, 0.25, 0.875;
						ShiftTexture = 3, 0.25, 0.875;
					Case 1:
						ShiftTexture = 1, 0.25, 0.8125;
						ShiftTexture = 3, 0.25, 0.8125;
				}
		}

		//車番（号車）定義ここまで


		//車番（編成）定義ここから

		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 = "../n_omtbn20n_1/sticker_20900r.x";
		CastShadow = no;
		BumpMap = 0,1,2;
		EnvMap = 0,1,2;
		ChangeTexture = 0, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 1, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 2, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 0, "../n_omtbn20_1/tex/wo.png", pbr;
		ChangeTexture = 1, "../n_omtbn20_1/tex/wo.png", pbr;
		ChangeTexture = 2, "../n_omtbn20_1/tex/wo.png", pbr;
		ChangeAlpha = 2,0.0;
		ChangeMaterial{
			MaterialID = 0;
			Diffuse = 1.0, 1.0, 1.0, 1.0;
			Ambient = 1.0, 1.0, 1.0;
　　　　　	}
		StaticRotation{
			RotationAxis = (0.0, 1.0, 0.0);
			RotationAngle = 180;
		}
		If "帯"==0 && "連結位置"==3 {
			ApplySwitch "女性専用車"{
				Case 0:
					ChangeMaterial{
						MaterialID = 2;
						Diffuse = 1.0, 1.0, 1.0, 1.0;
						Ambient = 1.0, 1.0, 1.0;
　　　			　　	}
				Default:
					ChangeModel = "", 1.0;
			}
		}
		If "帯"==1 && "連結位置"==1  {
			ChangeMaterial{
				MaterialID = 2;
				Diffuse = 1.0, 1.0, 1.0, 1.0;
				Ambient = 1.0, 1.0, 1.0;
　　　		}
			ChangeModel = "../n_omtbn20n_1/sticker_22800r.x", 1.0;
		}
		ApplySwitch "ベビーカーマーク"{
		Case 0:
			ChangeMaterial{
				MaterialID = 1;
				Diffuse = 1.0, 1.0, 1.0, 1.0;
				Ambient = 1.0, 1.0, 1.0;
　　　		}
		Case 1:
			ChangeAlpha = 1, 0.0;
		}
		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
/*---------------------------------------ステッカー定義ここまで---------------------------------------*/

/*---------------------------------------床下モデル定義ここから---------------------------------------*/
	Object3D "yuka"{
		ModelFileName = "";
		ApplySwitch "帯"{
			Case 0:
				ApplySwitch "連結位置"{
					Case 0,1,3,6,7:
						ChangeModel = "../n_omtbn20_1/yuka_20100.x", 1.0;
					Case 2:
						ChangeModel = "../n_omtbn20_1/yuka_20700.x", 1.0;
					Case 4,5:
						ChangeModel = "../n_omtbn20_1/yuka_20500.x", 1.0;
				}
			Case 1,2,3:
				ApplySwitch "連結位置"{
					Case 0,2,3:
						ChangeModel = "../n_omtbn20_1/yuka_20100.x", 1.0;
					Case 1:
						ChangeModel = "../n_omtbn20_1/yuka_20500.x", 1.0;
				}
			Case 4:
				ChangeModel = "../n_omtbn20_1/yuka_20100.x", 1.0;
		}
		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}

/*---------------------------------------床下モデル定義ここまで---------------------------------------*/

/*---------------------------------------転防モデル定義ここから---------------------------------------*/

	Object3D "Horo"{
		ModelFileName = "";
		ApplySwitch "転落防止幌"{
			Case 0:
				ChangeModel = "../n_omtbn20_1/horo.x", 1.0;
			Case 2:
				If ("帯"==0 && "連結位置"==7) || (("帯"==1 || "帯"==2 || "帯"==3) &&"連結位置"==3) || ("帯"==4 && "連結位置"==1){
					ChangeModel = "../n_omtbn20_1/horo.x", 1.0;
				}
		}
		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
	Object3D "Horo1"{
		ModelFileName = "";
		ApplySwitch "転落防止幌"{
			Case 0:
				ChangeModel = "../n_omtbn20_1/horo.x", 1.0;
			Case 2:
				ApplySwitch "連結位置"{
					Case 0:
						ChangeModel = "../n_omtbn20_1/horo.x", 1.0;
				}
		}
		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
			AttachDir = (0.0, 0.0, -1.0);
		}
	}
/*---------------------------------------転防モデル定義ここまで---------------------------------------*/

/*---------------------------------------扉モデル定義ここから（通常用）---------------------------------------*/
	Object3D "Doorll"{
		ModelFileName = "../n_omtbn20_1/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 0:
				If "連結位置"==3&&"女性専用車">0{
					ChangeModel = "", 1.0;
				}
			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;
		}

		//帯定義ここまで


		//PBR定義ここから

		BumpMap = 2,4;
		EnvMap = 2,4;
		ChangeTexture = 2, "../n_omtbn20_1/tex/車体2n.png", normal;
		ChangeTexture = 4, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 2, "../n_omtbn20_1/tex/車体2o.png", pbr;
		ChangeTexture = 4, "../n_omtbn20_1/tex/wo.png", pbr;
		ChangeMaterial{
			MaterialID = 2;
			Diffuse = 1.5, 1.5, 1.5, 1.0;
			Ambient = 1.0, 1.0, 1.0;
		}

		//PBR定義ここまで

		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}

	Object3D "Doorlr"{
		ModelFileName = "../n_omtbn20_1/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 0:
				If "連結位置"==3&&"女性専用車">0{
					ChangeModel = "", 1.0;
				}
			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;
		}

		//帯定義ここまで


		//PBR定義ここから

		BumpMap = 2,4;
		EnvMap = 2,4;
		ChangeTexture = 2, "../n_omtbn20_1/tex/車体2n.png", normal;
		ChangeTexture = 4, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 2, "../n_omtbn20_1/tex/車体2o.png", pbr;
		ChangeTexture = 4, "../n_omtbn20_1/tex/wo.png", pbr;
		ChangeMaterial{
			MaterialID = 2;
			Diffuse = 1.5, 1.5, 1.5, 1.0;
			Ambient = 1.0, 1.0, 1.0;
		}

		//PBR定義ここまで

		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
	Object3D "Doorrl"{
		ModelFileName = "../n_omtbn20_1/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 0:
				If "連結位置"==3&&"女性専用車">0{
					ChangeModel = "", 1.0;
				}
			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;
		}

		//帯定義ここまで


		//PBR定義ここから

		BumpMap = 2,4;
		EnvMap = 2,4;
		ChangeTexture = 2, "../n_omtbn20_1/tex/車体2n.png", normal;
		ChangeTexture = 4, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 2, "../n_omtbn20_1/tex/車体2o.png", pbr;
		ChangeTexture = 4, "../n_omtbn20_1/tex/wo.png", pbr;
		ChangeMaterial{
			MaterialID = 2;
			Diffuse = 1.5, 1.5, 1.5, 1.0;
			Ambient = 1.0, 1.0, 1.0;
		}

		//PBR定義ここまで

		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
			AttachDir = (0.0, 0.0, -1.0);
		}
	}
	Object3D "Doorrr"{
		ModelFileName = "../n_omtbn20_1/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 0:
				If "連結位置"==3&&"女性専用車">0{
					ChangeModel = "", 1.0;
				}
			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;
		}

		//帯定義ここまで


		//PBR定義ここから

		BumpMap = 2,4;
		EnvMap = 2,4;
		ChangeTexture = 2, "../n_omtbn20_1/tex/車体2n.png", normal;
		ChangeTexture = 4, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 2, "../n_omtbn20_1/tex/車体2o.png", pbr;
		ChangeTexture = 4, "../n_omtbn20_1/tex/wo.png", pbr;
		ChangeMaterial{
			MaterialID = 2;
			Diffuse = 1.5, 1.5, 1.5, 1.0;
			Ambient = 1.0, 1.0, 1.0;
		}

		//PBR定義ここまで

		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
			AttachDir = (0.0, 0.0, -1.0);
		}
	}
/*---------------------------------------扉モデル定義ここまで（通常用）---------------------------------------*/


/*---------------------------------------扉モデル定義ここから（ラッピング対応）---------------------------------------*/
	Object3D "Doorll_21400"{
		ModelFileName = "";
		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;
			}
		}

		//ドア動作定義ここまで


		//モデル・ラッピング定義ここから

		If "連結位置"==3&&"帯"==0{
			ApplySwitch "女性専用車"{
				Case 1:
					ChangeModel = "../n_omtbn20n_1/doorll_21400.x", 1.0;
				Case 2:
					ChangeModel = "../n_omtbn20n_1/doorll_21400.x", 1.0;
					ShiftTexture = 2, 0.0, 0.125;
				Case 3:
					ChangeModel = "../n_omtbn20n_1/doorll_21400.x", 1.0;
					ShiftTexture = 2, 0.0, 0.25;
			}
		}

		//モデル・ラッピング定義ここまで


		//PBR定義ここから

		BumpMap = 2,4;
		EnvMap = 2,4;
		ChangeTexture = 2, "../n_omtbn20n_1/tex/車体2n.png", normal;
		ChangeTexture = 4, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 2, "../n_omtbn20n_1/tex/車体2o.png", pbr;
		ChangeTexture = 4, "../n_omtbn20_1/tex/wo.png", pbr;

		//PBR定義ここまで

		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}

	Object3D "Doorlr_21400"{
		ModelFileName = "";
		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;
			}
		}

		//ドア動作定義ここまで

		//モデル・ラッピング定義ここから

		If "連結位置"==3&&"帯"==0{
			ApplySwitch "女性専用車"{
				Case 1:
					ChangeModel = "../n_omtbn20n_1/doorlr_21400.x", 1.0;
				Case 2:
					ChangeModel = "../n_omtbn20n_1/doorlr_21400.x", 1.0;
					ShiftTexture = 2, 0.0, 0.125;
				Case 3:
					ChangeModel = "../n_omtbn20n_1/doorlr_21400.x", 1.0;
					ShiftTexture = 2, 0.0, 0.25;
			}
		}

		//モデル・ラッピング定義ここまで


		//PBR定義ここから

		BumpMap = 2,4;
		EnvMap = 2,4;
		ChangeTexture = 2, "../n_omtbn20n_1/tex/車体2n.png", normal;
		ChangeTexture = 4, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 2, "../n_omtbn20n_1/tex/車体2o.png", pbr;
		ChangeTexture = 4, "../n_omtbn20_1/tex/wo.png", pbr;

		//PBR定義ここまで

		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
	Object3D "Doorrl_21400"{
		ModelFileName = "";
		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;
			}
		}

		//ドア動作定義ここまで


		//モデル・ラッピング定義ここから

		If "連結位置"==3&&"帯"==0{
			ApplySwitch "女性専用車"{
				Case 1:
					ChangeModel = "../n_omtbn20n_1/doorrl_21400.x", 1.0;
				Case 2:
					ChangeModel = "../n_omtbn20n_1/doorrl_21400.x", 1.0;
					ShiftTexture = 2, 0.0, 0.125;
				Case 3:
					ChangeModel = "../n_omtbn20n_1/doorrl_21400.x", 1.0;
					ShiftTexture = 2, 0.0, 0.25;
			}
		}

		//モデル・ラッピング定義ここまで


		//PBR定義ここから

		BumpMap = 2,4;
		EnvMap = 2,4;
		ChangeTexture = 2, "../n_omtbn20n_1/tex/車体2n.png", normal;
		ChangeTexture = 4, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 2, "../n_omtbn20n_1/tex/車体2o.png", pbr;
		ChangeTexture = 4, "../n_omtbn20_1/tex/wo.png", pbr;

		//PBR定義ここまで

		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
	Object3D "Doorrr_21400"{
		ModelFileName = "";
		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;
			}
		}

		//ドア動作定義ここまで


		//モデル・ラッピング定義ここから

		If "連結位置"==3&&"帯"==0{
			ApplySwitch "女性専用車"{
				Case 1:
					ChangeModel = "../n_omtbn20n_1/doorrr_21400.x", 1.0;
				Case 2:
					ChangeModel = "../n_omtbn20n_1/doorrr_21400.x", 1.0;
					ShiftTexture = 2, 0.0, 0.125;
				Case 3:
					ChangeModel = "../n_omtbn20n_1/doorrr_21400.x", 1.0;
					ShiftTexture = 2, 0.0, 0.25;
			}
		}

		//モデル・ラッピング定義ここまで


		//PBR定義ここから

		BumpMap = 2,4;
		EnvMap = 2,4;
		ChangeTexture = 2, "../n_omtbn20n_1/tex/車体2n.png", normal;
		ChangeTexture = 4, "../n_omtbn20_1/tex/n.png", normal;
		ChangeTexture = 2, "../n_omtbn20n_1/tex/車体2o.png", pbr;
		ChangeTexture = 4, "../n_omtbn20_1/tex/wo.png", pbr;

		//PBR定義ここまで

		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
/*---------------------------------------扉モデル定義ここまで（ラッピング対応）---------------------------------------*/

/*---------------------------------------戸閉灯モデル定義ここから---------------------------------------*/
	Object3D "Doorl"{
		ModelFileName = "../n_omtbn20_1/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 = "../n_omtbn20_1/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 = "../n_omtbn20_1/Shadow.x";
		NoCastShadow = 0;
			ApplySwitch "簡易影"{
			Case 1:
			ChangeModel = "", 1.0;
			}
		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}
/*---------------------------------------簡易影モデル定義ここまで---------------------------------------*/

	FrontCabin{
		Joint3D "MainBody"{
			AttachCoord = (0.0,0.0,0.0);
		}
	}
}

