Пример #1
0
    public void Interact(Tana caller)
    {
        var invetory = caller.GetComponent <Inventory>();

        if (invetory is null)
        {
            return;
        }

        var keyCount = invetory.GetItemCountByType(ItemType.KEY);

        if (keyCount == 0)
        {
            caller.PushDialog(new string[] { "Hay dos huecos para dos llaves" });
        }
        else if (keyCount == 1)
        {
            caller.PushDialog(new string[] { "Hay un hueco para una llave" });
        }
        else
        {
            caller.PushDialog(new string[] { "Se abre" });
            invetory.RemoveItemByType(ItemType.KEY, 2);
        }
    }
Пример #2
0
    void Awake()
    {
        current = this;

        this.player       = GameObject.FindObjectOfType <Tana>();
        this.playerCamera = GameObject.FindObjectOfType <CameraFollow>();

        this.resetPosition = this.player.transform.position;

        this.playerCamera.target = this.player.transform;
    }
Пример #3
0
    public void Interact(Tana caller)
    {
        var inventory = caller.GetComponent <Inventory>();

        var count = inventory.GetItemCountByType(ItemType.KEY);

        if (count == 2)
        {
            caller.PushDialog(new string[] { "Gate open" });
            Destroy(this.gameObject);
            Instantiate(this.smokeEffect, this.transform.position, Quaternion.identity);
        }
        else
        {
            caller.PushDialog(new string[] { "There are two holes for two keys" });
        }
    }
Пример #4
0
    public void Interact(Tana caller)
    {
        var inventory = caller.GetComponent <Inventory>();

        var count = inventory.GetItemCountByType(ItemType.SELF_FRAGMENT);

        if (count == 2)
        {
            Instantiate(this.finalShine, this.transform.position, Quaternion.identity);

            this.finalSound.Play();

            caller.PushDialog(new string[] {
                "Congratulations! This is where this minigame ends",
                "Thanks for playing :D"
            });
        }
        else
        {
            caller.PushDialog(new string[] { "The void stares back at you" });
        }
    }
Пример #5
0
 public void Interact(Tana caller)
 {
     caller.PushDialog(this.lines);
 }