PluginHeader{
	RailSimVersion = 2.00;
	PluginType = Train;
	PluginName = "[路面電車]1950年代風路面電車フリー素材1";
	PluginAuthor = "n";
	IconTexture = "";
	Description = "車体長:11.4m　車体高3.2m　車体幅:2.4m　車輪径:0.66m";
}



TrainInfo{
	FrontLimit = 7.0;
	TailLimit = -7.0;
	MaxVelocity = 40.0;
	MaxAcceleration = 3.0;
	MaxDeceleration = 3.5;
	DoorClosingTime = 5.0;
}
DefineSwitch "集電器"{
	Entry = "上昇_パンタグラフ";
	Entry = "下降_パンタグラフ";
	Entry = "正方向上昇_ビューゲル";
	Entry = "正方向下降_ビューゲル";
	Entry = "負方向上昇_ビューゲル";
	Entry = "負方向下降_ビューゲル";
}
DefineSwitch "屋根上機器(空調)"{
	Entry = "通風機";
	Entry = "冷房1";
	Entry = "冷房2";
	Entry = "冷房3";
	Entry = "冷房4";
	Entry = "無";
}
DefineSwitch "屋根上機器(他)"{
	Entry = "無";
	Entry = "SIV1";
	Entry = "SIV2";
}
DefineSwitch "台車"{
	Entry = "D-20A風";
}
DefineSwitch "台車汚れ"{
	Entry = "無";
	Entry = "有";
}












DefineSwitch "ライト"{
	Entry = "切";
	Entry = "入";
}
DefineSwitch "室内灯"{
	Entry = "切";
	Entry = "入";
}
DefineSwitch "ドア開閉"{
	Entry = "自動";
	Entry = "全開";
	Entry = "締切";
}
DefineSwitch "塗装"{
	Entry = "1";
	Entry = "2";
	Entry = "3";
}

PrimaryAssembly{
	Axle "wheel1"{
		ModelFileName = "1067wheel.x";
		ModelScale = 1.0;
		Diameter = 0.66;
		Symmetric = 12;
		Coord = (3.3,0.33);
	}
	Axle "wheel2"{
		ModelFileName = "1067wheel.x";
		ModelScale = 1.0;
		Diameter = 0.66;
		Symmetric = 12;
		Coord = (1.9,0.33);
	}
	Axle "wheel3"{
		ModelFileName = "1067wheel.x";
		ModelScale = 1.0;
		Diameter = 0.66;
		Symmetric = 12;
		Coord = (-1.9,0.33);
	}
	Axle "wheel4"{
		ModelFileName = "1067wheel.x";
		ModelScale = 1.0;
		Diameter = 0.66;
		Symmetric = 24;
		Coord = (-3.3,0.33);
	}
	Body "Bogie1"{
		ModelFileName = "bogie.x";
		ModelScale = 1.0;
		ApplySwitch "台車汚れ"{
		Case 1:ChangeTexture = 0, "tex/台車1.png";ChangeTexture = 1, "tex/台車1.png";
		}  
		JointZY "wheel1"{
			AttachCoord = (0.0,0.0);
			LocalCoord = (1.0,0.0);
		}
		JointZY "wheel2"{
			AttachCoord = (0.0,0.0);
			LocalCoord = (-1.0,0.0);
		}
	}
	Body "Bogie2"{
		ModelFileName = "bogie.x";
		ModelScale = 1.0;
		ApplySwitch "台車汚れ"{
		Case 1:ChangeTexture = 0, "tex/台車1.png";ChangeTexture = 1, "tex/台車1.png";
		}  
		JointZY "wheel3"{
			AttachCoord = (0,0.0);
			LocalCoord = (1.0,0.0);
		}
		JointZY "wheel4"{
			AttachCoord = (0,0.0);
			LocalCoord = (-1.0,0.0);
		}
	}
	Body "Dummy"{
		ModelFileName = "";
		JointZY "Bogie1"{
			AttachCoord = (0.0, 0.0);
			LocalCoord = (1.0, 0.33);
		}
		JointZY "Bogie2"{
			AttachCoord = (0.0, 0.0);
			LocalCoord = (-1.0, 0.33);
		}
	}



	Object3D "Doorl"{
		ModelFileName = "Doorl.x";
		ModelScale = 1.0;
		NoCastShadow = 2;
		Transparent = 2;
		ApplySwitch "室内灯"{
		Case 1:
		ChangeMaterial{
		MaterialID = 1;
		Emissive = 0.6, 0.6, 0.6;
		}
　　　　　　　　}
		ApplySwitch "塗装"{
		Case 0:ChangeTexture = 0, "tex/ドア0.png";
		Case 1:ChangeTexture = 0, "tex/ドア1.png";
		Case 2:ChangeTexture = 0, "tex/ドア2.png";
		}
		ApplySwitch "ドア開閉"{
		Case 0:
		ApplySwitch "_DOOR1"{
		Case 1:
			StaticMove{
				Displacement = (0.0, 0.0, -0.81);
				PreAnimationDelay = 0.6;
				AnimationTime = 1.5;
			}
			}
		Case 1:
			StaticMove{
				Displacement = (0.0, 0.0, -0.81);
				PreAnimationDelay = 0.6;
				AnimationTime = 1.5;
			}
	
		}

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


	Object3D "Doorr"{
		ModelFileName = "Doorr.x";
		ModelScale = 1.0;
		NoCastShadow = 2;
		Transparent = 2;
		ApplySwitch "室内灯"{
		Case 1:
		ChangeMaterial{
		MaterialID = 1;
		Emissive = 0.6, 0.6, 0.6;
		}
　　　　　　　　}
		ApplySwitch "塗装"{
		Case 0:ChangeTexture = 0, "tex/ドア0.png";
		Case 1:ChangeTexture = 0, "tex/ドア1.png";
		Case 2:ChangeTexture = 0, "tex/ドア2.png";
		}
		ApplySwitch "ドア開閉"{
		Case 0:
		ApplySwitch "_DOOR2"{
		Case 1:
			StaticMove{
				Displacement = (0.0, 0.0, 0.81);
				PreAnimationDelay = 0.6;
				AnimationTime = 1.5;
			}
			}
		Case 1:
			StaticMove{
				Displacement = (0.0, 0.0, 0.81);
				PreAnimationDelay = 0.6;
				AnimationTime = 1.5;
			}
	
		}
		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}

	Object3D "MainBody"{
		ModelFileName = "body.x";
		ModelScale = 1.0;
		AlphaZeroTest = 10;
		NoCastShadow = 0,1,3,4,5,6,7,8,9,10;
		ApplySwitch "室内灯"{
		Case 1:
		ChangeMaterial{
		MaterialID = 4,5,6,7,8,9,10;
		Emissive = 0.6, 0.6, 0.6; 
		}
　　　　　　　　}
		ApplySwitch "塗装"{
		Case 0:ChangeTexture = 11, "tex/前0.png";ChangeTexture = 12, "tex/側面0.png";  
		Case 1:ChangeTexture = 11, "tex/前1.png";ChangeTexture = 12, "tex/側面1.png";  
		Case 2:ChangeTexture = 11, "tex/前2.png";ChangeTexture = 12, "tex/側面2.png";  
		}
		Joint3D "Dummy"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}

	Object3D "Lightz"{
		ModelFileName = "light.x";
		ModelScale = 1.0;
		If"ライト"==1 &&"_FRONT"==0&&"_NIGHT"==0{
		ChangeTexture = 1, "tex/前照灯入.png";  
		ChangeMaterial{
		MaterialID = 1;
		Emissive = 1.0, 1.0, 1.0;
		}
		}
		If "ライト"==1 &&"_FRONT"==0&&"_NIGHT"==1{
		ChangeTexture = 1, "tex/前照灯入1.png";  
		ChangeMaterial{
		MaterialID = 1;
		Emissive = 1.0, 1.0, 1.0;
		}
		}
		If"ライト"==1 &&"_FRONT"==1{
		ChangeTexture = 2, "tex/後部灯入.png";  
		ChangeMaterial{
		MaterialID = 2;
		Emissive = 1.0, 1.0, 1.0;
		}
		}
		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
		}
	}

	Object3D "Light-z"{
		ModelFileName = "light.x";
		ModelScale = 1.0;
		If "ライト"==1 &&"_FRONT"==1{
		ChangeTexture = 1, "tex/前照灯入.png";  
		ChangeMaterial{
		MaterialID = 1;
		Emissive = 1.0, 1.0, 1.0;
		}
		}
		If "ライト"==1 &&"_FRONT"==1&&"_NIGHT"==1{
		ChangeTexture = 1, "tex/前照灯入1.png";  
		ChangeMaterial{
		MaterialID = 1;
		Emissive = 1.0, 1.0, 1.0;
		}
		}
		If"ライト"==1 &&"_FRONT"==0{
		ChangeTexture = 2, "tex/後部灯入.png";  
		ChangeMaterial{
		MaterialID = 2;
		Emissive = 1.0, 1.0, 1.0;
		}
		}
		Joint3D "MainBody"{
			AttachCoord = (0.0, 0.0, 0.0);
			AttachDir = (0.0, 0.0, -1.0);
		}
	}
	Object3D "ventilator"{
		ModelFileName = "";
		ModelScale = 1.0;
		ApplySwitch "屋根上機器(空調)"{
		Case 0:ChangeModel = "ventilator.x", 1.0;
		}
		Joint3D "MainBody"{
			AttachCoord = (0.0, 3.2, 0.0);
		}
	}
	Object3D "cooler"{
		ModelFileName = "";
		ModelScale = 1.0;
		ApplySwitch "屋根上機器(空調)"{
		Case 1:ChangeModel = "cooler1.x", 1.0;
		Case 2:ChangeModel = "cooler2.x", 1.0;
		Case 3:ChangeModel = "cooler3.x", 1.0;
		Case 4:ChangeModel = "cooler4.x", 1.0;
		}
		Joint3D "MainBody"{
			AttachCoord = (0.0, 3.25, 3.5);
		}
	}
	Object3D "siv"{
		ModelFileName = "";
		ModelScale = 1.0;
		ApplySwitch "屋根上機器(他)"{
		Case 1:ChangeModel = "siv1.x", 1.0;
		Case 2:ChangeModel = "siv2.x", 1.0;
		}
		Joint3D "MainBody"{
			AttachCoord = (0.0, 3.25, -3.3);
		}
	}
	Object3D "BugelBasez"{
		ModelFileName = "";
		ApplySwitch "集電器"{
		Case 2,3:ChangeModel = "bugelbase.x", 1.0;
		}
		Joint3D "MainBody"{
			AttachCoord = (0.0, 3.4, 0.0);
			AttachDir = (0.0, 0.0, 1.0);
		}
	}
	Object3D "Bugelz"{
		ModelFileName = "";
		ApplySwitch "集電器"{
		Case 2:
			ChangeModel = "bugel.x", 1.0;
			StaticRotation{
				RotationAxis = (1.0, 0.0, 0.0);
				RotationAngle = 52.0;
				AnimationTime = 3.0;
			}
		Case 3:
			ChangeModel = "bugel.x", 1.0;
		}
		Joint3D "BugelBasez"{
			AttachCoord = (0.0, 0.1, 0.0);
		}
	}



	Object3D "BugelBase-z"{
		ModelFileName = "";
		ApplySwitch "集電器"{
		Case 4,5:ChangeModel = "bugelbase.x", 1.0;
		}
		Joint3D "MainBody"{
			AttachCoord = (0.0, 3.4, 0.0);
			AttachDir = (0.0, 0.0, 1.0);
		}
	}
	Object3D "Bugel-z"{
		ModelFileName = "";
		ApplySwitch "集電器"{
		Case 4:
			ChangeModel = "bugel1.x", 1.0;
			StaticRotation{
				RotationAxis = (-1.0, 0.0, 0.0);
				RotationAngle = 52.0;
				AnimationTime = 3.0;
			}
		Case 5:
			ChangeModel = "bugel1.x", 1.0;
		}
		Joint3D "BugelBasez"{
			AttachCoord = (0.0, 0.1, 0.0);
		}
	}


	Object3D "HishiBase"{
		ModelFileName = "";
		ApplySwitch "集電器"{
		Case 0,1:ChangeModel = "HishiBase.x", 1.0;
		}
		Joint3D "MainBody"{
			AttachCoord = (0.0, 3.25, 0.0);
		}
	}
	Object3D "HishiShoe"{
		ModelFileName = "";
		ApplySwitch "集電器"{
		Case 0,1:ChangeModel = "HishiShoe.x", 1.0;
		}
			StaticMove{	
				Displacement = (0.0, 0.1, 0.0);
				PreAnimationDelay = 0.1;
				AnimationTime = 0.0;
		}
		ApplySwitch "集電器"{
		Case 0:
			StaticMove{
				Displacement = (0.0, 1.45, 0.0);
				PreAnimationDelay = 0.1;
				AnimationTime = 2.0;
			}
		}
		Joint3D "HishiBase"{
			AttachCoord = (0.0, 0.3, 0.0);
		}
	}
	TriangleZY{
		Link "HishiArm-y-z"{
			ModelFileName = "";
			ApplySwitch "集電器"{
			Case 0,1:ChangeModel = "HishiArm-y.x", 1.0;
			}
			JointZYX "HishiBase"{
				AttachCoord = (0.40, 0.15);
				LocalCoord = (0.0, 0.0);
			}
			LinkCoord = (1.00, 0.00);
		}
		Link "HishiArmy-z"{
			ModelFileName = "";
			ApplySwitch "集電器"{
			Case 0,1:ChangeModel = "HishiArmy.x", 1.0;
			}
			JointZYX "HishiShoe"{
				AttachCoord = (0.0, -0.1);
				LocalCoord = (0.0, 0.0);
			}
			LinkCoord = (1.4, -0.00);
		}
	}
	TriangleZY{
		Link "HishiArmyz"{
			ModelFileName = "";
			Turn = yes;
			ApplySwitch "集電器"{
			Case 0,1:ChangeModel = "HishiArmy.x", 1.0;
			}
			JointZYX "HishiShoe"{
				AttachCoord = (0.0, -0.1);
				LocalCoord = (0.0, 0.0);
			}
			LinkCoord = (1.4, -0.00);
		}
		Link "HishiArm-yz"{
			ModelFileName = "";
			Turn = yes;
			ApplySwitch "集電器"{
			Case 0,1:ChangeModel = "HishiArm-y.x", 1.0;
			}
			JointZYX "HishiBase"{
				AttachCoord = (-0.40, 0.15);
				LocalCoord = (0.0, 0.02);
			}
			LinkCoord = (1.00, 0.00);
		}
	}

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

