public void removeImage(string name) { if (name == "all") { foreach (KeyValuePair <string, Image> kvp in this.dicImage) { string key = kvp.Key; Image tmp = this.getImage(key); this.removeTag(tmp.getParam("tag"), name); tmp.remove(); this.dicImage.Remove(key); //イベント消去 NovelSingleton.GameManager.eventManager.removeEvent(key); } } else { Image tmp = this.getImage(name); this.removeTag(tmp.getParam("tag"), name); this.getImage(name).remove(); this.dicImage.Remove(name); //イベント消去 NovelSingleton.GameManager.eventManager.removeEvent(name); } }
//キャラクター追加 public void addImage(Image image) { //イメージをコンパイルして画面に追加する image.compile(); string name = image.getParam("name"); string tag = image.getParam("tag"); this.dicImage[name] = image; //タグを追加します if (tag != "") { if (!this.dicTag.ContainsKey(tag)) { this.dicTag [tag] = new Dictionary <string, Image> (); } this.dicTag [tag][name] = this.dicImage[name]; } }
public override void start() { string name = this.param ["name"]; string tag = this.param ["tag"]; float time = float.Parse(this.param ["time"]); List <string> images = new List <string> (); if (tag != "") { images = this.gameManager.imageManager.getImageNameByTag(tag); } else { images.Add(name); } foreach (string image_name in images) { Image image = this.gameManager.imageManager.getImage(image_name); float x = (this.param ["x"] != "") ? float.Parse(this.param["x"]) : float.Parse(image.getParam("x")); float y = (this.param ["y"] != "") ? float.Parse(this.param ["y"]) : float.Parse(image.getParam("y")); float z = (this.param ["z"] != "") ? float.Parse(this.param ["z"]) : float.Parse(image.getParam("z")); //Debug.Log ("anim--------------"); //Debug.Log (x + ":" + y + ":" + z); float scale = (this.param["scale"] != "") ? float.Parse(this.param["scale"]) : float.Parse(image.getParam("scale")); if (this.param ["wait"] == "true") { //クリック無効にする StatusManager.enableClickOrder = false; image.getObject().animCompleteDeletgate = this.finishAnimation; } image.animPosition(new Vector3(x, y, z), scale, time, this.param["type"]); if (this.param ["wait"] != "true") { this.gameManager.nextOrder(); } } }
public override void start() { string name = this.param ["name"]; string tag = this.param ["tag"]; bool flag_delegate = true; List <string> images = new List <string> (); if (tag != "") { images = this.gameManager.imageManager.getImageNameByTag(tag); } else { images.Add(name); } foreach (string image_name in images) { Image image = this.gameManager.imageManager.getImage(image_name); float x = (this.param ["x"] != "") ? float.Parse(this.param ["x"]) : float.Parse(image.getParam("x")); float y = (this.param ["y"] != "") ? float.Parse(this.param ["y"]) : float.Parse(image.getParam("y")); float z = (this.param ["z"] != "") ? float.Parse(this.param ["z"]) : float.Parse(image.getParam("z")); float time = float.Parse(this.param ["time"]); string type = this.param ["type"]; //string wait = this.param ["wait"]; image.setPosition(x, y, z); //アニメーション中にクリックして次に進めるかどうか。 StatusManager.enableNextOrder = false; //処理を待たないなら if (this.param ["wait"] == "false") { StatusManager.enableNextOrder = true; this.gameManager.nextOrder(); } else { //設定するのは一つだけ if (flag_delegate == true) { flag_delegate = false; image.getObject().setFinishAnimationDelegate(this.finishAnimationDeletgate); } } image.show(time, type); } }
public override void start() { string name = this.param ["name"]; Image image = this.gameManager.imageManager.getImage(name); float x = (this.param["x"] != "") ? float.Parse(this.param["x"]) : float.Parse(image.getParam("x")); float y = (this.param ["y"] != "") ? float.Parse(this.param ["y"]) : float.Parse(image.getParam("y")); float z = (this.param["z"] != "") ? float.Parse(this.param["z"]) : float.Parse(image.getParam("z")); image.setPosition(x, y, z); //scaleが指定されている場合はそっちを優先 if (this.param ["scale"] != "") { this.param ["scale_x"] = this.param ["scale"]; this.param ["scale_y"] = this.param ["scale"]; this.param ["scale_z"] = this.param ["scale"]; } float scale_x = (this.param["scale_x"] != "") ? float.Parse(this.param["scale_x"]) : float.Parse(image.getParam("scale_x")); float scale_y = (this.param["scale_y"] != "") ? float.Parse(this.param["scale_y"]) : float.Parse(image.getParam("scale_y")); float scale_z = (this.param["scale_z"] != "") ? float.Parse(this.param["scale_z"]) : float.Parse(image.getParam("scale_z")); image.setScale(scale_x, scale_y, scale_z); //アニメーション中にクリックして次に進めるかどうか。 this.gameManager.nextOrder(); }
//キャラクター追加 public void addImage(Image image){ //イメージをコンパイルして画面に追加する image.compile (); string name = image.getParam ("name"); string tag = image.getParam ("tag"); this.dicImage[name] = image; //タグを追加します if (tag != "") { if (!this.dicTag.ContainsKey (tag)) { this.dicTag [tag] = new Dictionary<string,Image> (); } this.dicTag [tag][name] = this.dicImage[name]; } }