protected override void Open(EscapeGame game) { m_Closed = false; Debug.Log("Box is opened."); game.Putback(); game.Take(m_Content); }
public override void Interact(EscapeGame game) { if (string.IsNullOrEmpty(m_KeyIdentifier)) { Open(game); return; } KeyEntity key = game.TakenEntity as KeyEntity; if (key != null) { if (key.Identifier == m_KeyIdentifier) { Open(game); } else { Debug.Log(string.Format("This item cannot be opened by the key <color=white>{0}</color>", key.Name)); } } else { Debug.Log("You need a key to open it."); } }
protected virtual void Open(EscapeGame game) { Debug.Log("Succeed to open the item, but nothing happened."); }
public override void Interact(EscapeGame game) { Debug.Log(string.Format("Read the paper:<color=white>{0}</color>", m_Content)); }
public virtual void Interact(EscapeGame game) { Debug.Log("Nothing happened."); }
public override void Interact(EscapeGame game) { game.Putback(); game.Take(m_Content); }
// public override void Interact(EscapeGame game) // { // Debug.Log("It's the right exit."); // game.Escape(); // } protected override void Open(EscapeGame game) { Debug.Log("It's the right exit."); game.Escape(); }
// Start is called before the first frame update void Start() { m_Game = new EscapeGame(); }
protected override void Open(EscapeGame game) { Debug.Log("<color=red>You release a monster.</color>"); game.Die(); }
public override void Interact(EscapeGame game) { game.Take(this); }