public void compile() { GameObject g = new GameObject("gameobject"); AbstractObject imageObject; string className = this.dicSave ["className"]; if (className == "Text") { imageObject = g.AddComponent <TextObject> (); } else if (className == "Clickable") { imageObject = g.AddComponent <ClickableObject> (); } else if (className == "Sd") { imageObject = g.AddComponent <SdObject> (); } else if (className == "Button") { imageObject = g.AddComponent <ButtonObject> (); } else if (className == "Live2d") { imageObject = g.AddComponent <Live2dObject> (); } else { imageObject = g.AddComponent <ImageObject> (); } imageObject.name = this.getParam("name"); //画像なりをセット imageObject.imagePath = this.dicSave["imagePath"]; imageObject.set(this.dicSave); this.imageObject = imageObject; //このオブジェクトが表示対象の場合は即表示 this.setPosition(float.Parse(this.dicSave["x"]), float.Parse(this.dicSave["y"]), float.Parse(this.dicSave["z"])); //scale の設定 this.setScale(float.Parse(this.dicSave["scale_x"]), float.Parse(this.dicSave["scale_y"]), float.Parse(this.dicSave["scale_z"])); //イベントが登録されている場合はcolider 登録 if (this.dicSave ["event"] == "true") { this.setColider(); } if (dicSave ["isShow"] == "true") { this.show(0, "linear"); } }
public void compile(){ GameObject g = new GameObject ("gameobject"); AbstractObject imageObject; string className = this.dicSave ["className"]; if (className == "Text") { imageObject = g.AddComponent<TextObject> (); } else if (className == "Clickable") { imageObject = g.AddComponent<ClickableObject> (); } else if (className == "Sd") { imageObject = g.AddComponent<SdObject> (); } else if (className == "Button") { imageObject = g.AddComponent<ButtonObject> (); } else if (className == "Live2d") { imageObject = g.AddComponent<Live2dObject> (); }else{ imageObject = g.AddComponent<ImageObject> (); } imageObject.name = this.getParam ("name"); //画像なりをセット imageObject.imagePath = this.dicSave["imagePath"]; imageObject.set (this.dicSave); this.imageObject = imageObject; //このオブジェクトが表示対象の場合は即表示 this.setPosition(float.Parse(this.dicSave["x"]),float.Parse(this.dicSave["y"]),float.Parse(this.dicSave["z"])); //scale の設定 this.setScale (float.Parse(this.dicSave["scale_x"]),float.Parse(this.dicSave["scale_y"]),float.Parse(this.dicSave["scale_z"])); //イベントが登録されている場合はcolider 登録 if (this.dicSave ["event"] == "true") { this.setColider (); } if (dicSave ["isShow"] == "true") { this.show (0, "linear"); } }
public void remove() { this.imageObject.remove(); this.imageObject = null; }
public void remove(){ this.imageObject.remove(); this.imageObject = null; }