示例#1
0
 protected override void Open(EscapeGame game)
 {
     m_Closed = false;
     Debug.Log("Box is opened.");
     game.Putback();
     game.Take(m_Content);
 }
示例#2
0
    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.");
        }
    }
示例#3
0
 protected virtual void Open(EscapeGame game)
 {
     Debug.Log("Succeed to open the item, but nothing happened.");
 }
示例#4
0
 public override void Interact(EscapeGame game)
 {
     Debug.Log(string.Format("Read the paper:<color=white>{0}</color>", m_Content));
 }
示例#5
0
 public virtual void Interact(EscapeGame game)
 {
     Debug.Log("Nothing happened.");
 }
示例#6
0
 public override void Interact(EscapeGame game)
 {
     game.Putback();
     game.Take(m_Content);
 }
示例#7
0
 // 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();
 }
示例#8
0
 // Start is called before the first frame update
 void Start()
 {
     m_Game = new EscapeGame();
 }
示例#9
0
 protected override void Open(EscapeGame game)
 {
     Debug.Log("<color=red>You release a monster.</color>");
     game.Die();
 }
示例#10
0
 public override void Interact(EscapeGame game)
 {
     game.Take(this);
 }