public override IEnumerator Action() { if (this.name == "带灯罩的灯") { yield break; } if (!Scene.GetScene().Contains("花架")) { this.description = "The light is high..."; } else if (this.state) { this.description = "It is not safe to install with the power on."; } else { this.description = "OK! Now the lampshade can be installed."; if (ItemPack.GetPack().isOn("灯罩")) { ItemPack.GetPack().TakeAway("灯罩"); this.lightOff = this.LightWithShde_off; this.lightOn = this.LightWithShade_on; this.GetComponent <Image>().sprite = this.lightOff; this.name = "带灯罩的灯"; this.description = "Complete! Let's give it a try."; } } yield return(null); }
public override IEnumerator Action() { if (this.name == "带灯罩的灯") { yield break; } if (!Scene.GetScene().Contains("花架")) { this.description = "灯好高啊..."; } else if (this.state) { this.description = "通电作业不太安全。"; } else { this.description = "这下就可以安装灯罩了。"; if (ItemPack.GetPack().isOn("灯罩")) { ItemPack.GetPack().TakeAway("灯罩"); this.lightOff = this.LightWithShde_off; this.lightOn = this.LightWithShade_on; this.GetComponent <Image>().sprite = this.lightOff; this.name = "带灯罩的灯"; this.description = "完成了!我需要来试下效果。"; } } yield return(null); }
public void Win() { Scene.GetScene().BlockOn(); Corner.GetCorner().BlockOn(); Menu.GetMenu().BlockOn(); ItemPack.GetPack().BlockOn(); StartCoroutine(ShowWin()); }
public override void OnItemAction(ItemGrid grid, EventArgs e) { if (ItemPack.GetPack().isOn("铅笔")) { HUD hud = HUD.GetHUD(); hud.BrotherSpeak("难过", "By accident, I destroy the crucial clues!"); hud.Lose(); } }
public override void OnItemAction(ItemGrid grid, EventArgs e) { if (ItemPack.GetPack().isOn("铅笔")) { HUD hud = HUD.GetHUD(); hud.BrotherSpeak("难过", "用地毯画魔法阵,你不怕挨揍吗O_O"); hud.Lose(); } }
public override IEnumerator Action() { ItemPack pack = ItemPack.GetPack(); if (pack.isOn("有电的遥控器")) { pack.TakeAway("有电的遥控器"); screen.SetActive(true); } yield return(null); }
protected void Pick() { Debug.Log("正在拾取道具:" + this.name); ItemGrid grid = ItemPack.GetPack().PutIn(this); grid.OnAction += this.OnItemAction; Image image = this.GetComponent <Image>(); if (image) { image.enabled = false; } }
public override void OnItemAction(ItemGrid grid, EventArgs e) { if (ItemPack.GetPack().isOn("电池")) { ItemPack.GetPack().TakeAway("电池"); ItemPack.GetPack().TakeAway("没电的遥控器"); PickableProp controllerUseable = new PickableProp(); controllerUseable.name = "有电的遥控器"; controllerUseable.item_desc = "Don't let Grace find the remote controller..."; controllerUseable.icon_off = this.controllerUseable_off; controllerUseable.icon_on = this.controllerUseable_on; ItemPack.GetPack().PutIn(controllerUseable); } }
public void TryPut() { ItemPack pack = ItemPack.GetPack(); for (int i = 0; i < this._putableItem.Length; i++) { string item = this._putableItem[i]; if (!pack.isOn(item)) { continue; } pack.TakeAway(item); this.Put(this._targetProp[i], this._putPos[i]); break; } }