public virtual void TavernOnClick(MainPanelButton caller)
    {
        caller.mainPanel.SetActive(false);
        caller.linkedPanel.SetActive(true);

        caller.interactionsText.text = "*The tavern is filled with rowdy drunks, singing along with a bard who looks like he'd " +
                                       "rather be elsewhere. The bartender greets you warmly, offering food and drinks (for an outrageous price, of course).*";

        activePanel = caller.linkedPanel;
    }
    public virtual void BlacksmithOnClick(MainPanelButton caller)
    {
        caller.mainPanel.SetActive(false);
        caller.linkedPanel.SetActive(true);

        caller.goldCountText.text    = "Gold: " + PlayerStatus.GoldCount;
        caller.interactionsText.text = "Need yourself some steel? You've come to the right place.";

        activePanel = caller.linkedPanel;
    }
    public virtual void ArchetierOnClick(MainPanelButton caller)
    {
        caller.mainPanel.SetActive(false);
        caller.linkedPanel.SetActive(true);

        caller.goldCountText.text    = "Gold: " + PlayerStatus.GoldCount;
        caller.interactionsText.text = "It may not be as flashy, but a bow in the right hands is worth a dozen muskets. " +
                                       "Anything I can get for you?";

        activePanel = caller.linkedPanel;
    }
    public virtual void WardsmithOnClick(MainPanelButton caller)
    {
        caller.mainPanel.SetActive(false);
        caller.linkedPanel.SetActive(true);

        caller.goldCountText.text    = "Gold: " + PlayerStatus.GoldCount;
        caller.interactionsText.text = "Ahhhh. Welcome, good sir. You've come to the right store; the other wardsmiths on this island " +
                                       "are contemptible amateurs.";

        activePanel = caller.linkedPanel;
    }
    public virtual void GunsmithOnClick(MainPanelButton caller)
    {
        caller.mainPanel.SetActive(false);
        caller.linkedPanel.SetActive(true);

        caller.goldCountText.text    = "Gold: " + PlayerStatus.GoldCount;
        caller.relevantStatText.text = "Cannonballs: " + PlayerStatus.AmmoCount.ToString();
        caller.interactionsText.text = "Looking to defend yourself, huh? I got just the thing.";

        activePanel = caller.linkedPanel;
    }
    //What the buttons in the visitation scene do, which can be overwritten by a subclass of IslandAttributes
    public virtual void MarketOnClick(MainPanelButton caller)
    {
        caller.mainPanel.SetActive(false);
        caller.linkedPanel.SetActive(true);

        caller.goldCountText.text    = "Gold: " + PlayerStatus.GoldCount;
        caller.relevantStatText.text = "Resources: " + PlayerStatus.ResourcesCount.ToString();
        caller.interactionsText.text = "Whatcha buyin', stranger?";

        activePanel = caller.linkedPanel;
    }
示例#7
0
    public override void SpecialOnClick(MainPanelButton caller)
    {
        if (QuestsStatus.testQuestStatus == 50)
        {
            caller.mainPanel.gameObject.SetActive(false);

            DialogueManager.SetUpDialogue("Assets/DialogueTextFiles/" + elliaFifty);

            DialoguePanelManager dpm = caller.dialoguePanel.GetComponent <DialoguePanelManager>();

            caller.dialoguePanel.SetActive(true);
            dpm.Setup(0);
        }

        if (QuestsStatus.testQuestStatus == 100)
        {
            caller.interactionsText.text = "Sorry, but this store isn't open yet!";
        }
    }
    public virtual void ShipswrightOnClick(MainPanelButton caller)
    {
        caller.mainPanel.SetActive(false);
        caller.linkedPanel.SetActive(true);

        if (PlayerStatus.ShipHealthCurrent == PlayerStatus.ShipHealthMax)
        {
            caller.interactionsText.text = "Looking to upgrade your ship, eh?";
        }
        else
        {
            caller.interactionsText.text = "Yer ship's lookin' a little rough there. " +
                                           "Want me to patch 'er up fer ya?";
        }

        caller.goldCountText.text    = "Gold: " + PlayerStatus.GoldCount;
        caller.relevantStatText.text = "Ship Health: " + PlayerStatus.ShipHealthCurrent + "/" + PlayerStatus.ShipHealthMax;

        activePanel = caller.linkedPanel;
    }
    // Use this for initialization
    void Start()
    {
        buttonRef = (MainPanelButton)thisButton.GetComponent <MainPanelButton>();
        if (thisButton.CompareTag("Special"))
        {
            buttonText.text = PlayerStatus.VisitingIsland.specialText;
        }

        //Find all the private game object references so it doesn't have to be done in the editor
        interactionsText = GameObject.Find("InteractionsText").GetComponent <Text>();
        relevantStatText = GameObject.Find("RelevantStatCount").GetComponent <Text>();
        goldCountText    = GameObject.Find("GoldCount").GetComponent <Text>();
        //mainPanel = GameObject.Find("MainPanel").GetComponent<GameObject>();
        //marketPanel = GameObject.Find("MarketPanel").GetComponent<GameObject>();
        //shipswrightPanel = GameObject.Find("ShipswrightPanel").GetComponent<GameObject>();
        //tavernPanel = GameObject.Find("TavernPanel").GetComponent<GameObject>();
        //blacksmithPanel = GameObject.Find("BlacksmithPanel").GetComponent<GameObject>();
        //gunsmithPanel = GameObject.Find("GunsmithPanel").GetComponent<GameObject>();
        //archetierPanel = GameObject.Find("ArchetierPanel").GetComponent<GameObject>();
        //wardsmithPanel = GameObject.Find("WardsmithPanel").GetComponent<GameObject>();
        //dialoguePanel = GameObject.Find("DialoguePanel").GetComponent<GameObject>();

        thisButton.onClick.AddListener(OnClick);
    }
    public override void SpecialOnClick(MainPanelButton caller)
    {
        if (QuestsStatus.testQuestStatus == 0)
        {
            caller.mainPanel.gameObject.SetActive(false);

            DialogueManager.SetUpDialogue("Assets/DialogueTextFiles/" + aldrennZero);

            DialoguePanelManager dpm = caller.dialoguePanel.GetComponent <DialoguePanelManager>();
            //dpm.currentScript = DialogueManager.dScript;

            caller.dialoguePanel.SetActive(true);
            dpm.Setup(0);
        }

        if (QuestsStatus.testQuestStatus == 10)
        {
            caller.mainPanel.gameObject.SetActive(false);

            DialogueManager.SetUpDialogue("Assets/DialogueTextFiles/" + aldrennTen);

            DialoguePanelManager dpm = caller.dialoguePanel.GetComponent <DialoguePanelManager>();
            //dpm.currentScript = DialogueManager.dScript;

            caller.dialoguePanel.SetActive(true);
            dpm.Setup(0);
        }

        if (QuestsStatus.testQuestStatus == 20)
        {
            caller.mainPanel.gameObject.SetActive(false);

            DialogueManager.SetUpDialogue("Assets/DialogueTextFiles/" + aldrennTwenty);

            DialoguePanelManager dpm = caller.dialoguePanel.GetComponent <DialoguePanelManager>();
            //dpm.currentScript = DialogueManager.dScript;

            caller.dialoguePanel.SetActive(true);
            dpm.Setup(0);
        }

        if (QuestsStatus.testQuestStatus == 30)
        {
            caller.mainPanel.gameObject.SetActive(false);

            DialogueManager.SetUpDialogue("Assets/DialogueTextFiles/" + aldrennThirty);

            DialoguePanelManager dpm = caller.dialoguePanel.GetComponent <DialoguePanelManager>();
            //dpm.currentScript = DialogueManager.dScript;

            caller.dialoguePanel.SetActive(true);
            dpm.Setup(0);
        }

        if (QuestsStatus.testQuestStatus >= 40)
        {
            caller.mainPanel.gameObject.SetActive(false);

            DialogueManager.SetUpDialogue("Assets/DialogueTextFiles/" + aldrennFortyPlus);

            DialoguePanelManager dpm = caller.dialoguePanel.GetComponent <DialoguePanelManager>();
            //dpm.currentScript = DialogueManager.dScript;

            caller.dialoguePanel.SetActive(true);
            dpm.Setup(0);
        }

        if (QuestsStatus.testQuestStatus == 100)
        {
            caller.mainPanel.gameObject.SetActive(false);

            DialogueManager.SetUpDialogue("Assets/DialogueTextFiles/" + aldrennHundred);

            DialoguePanelManager dpm = caller.dialoguePanel.GetComponent <DialoguePanelManager>();
            //dpm.currentScript = DialogueManager.dScript;

            caller.dialoguePanel.SetActive(true);
            dpm.Setup(0);
        }

        if (QuestsStatus.testQuestStatus == -10)
        {
            caller.mainPanel.gameObject.SetActive(false);

            DialogueManager.SetUpDialogue("Assets/DialogueTextFiles/" + aldrennNegTen);

            DialoguePanelManager dpm = caller.dialoguePanel.GetComponent <DialoguePanelManager>();
            //dpm.currentScript = DialogueManager.dScript;

            caller.dialoguePanel.SetActive(true);
            dpm.Setup(0);
        }
    }
 public virtual void SetSailOnClick(MainPanelButton caller)
 {
     SceneManager.LoadScene(SceneIndexes.WorldMap());
 }
 public virtual void SpecialOnClick(MainPanelButton caller) //Generic islands have no special button
 {
     Debug.Log("This shouldn't be here");
 }