Ejemplo n.º 1
0
    private void MakeButton(ServantVO s)
    {
        GameObject             button      = GameObject.Instantiate(gossipInventoryButtonPrefab);
        ServantInventoryButton buttonStats = button.GetComponent <ServantInventoryButton>();

        buttonStats.servant = s;
        button.transform.SetParent(this.transform, false);
        Debug.Log("Servant Button: " + s.NameAndTitle + " is made!");
    }
Ejemplo n.º 2
0
 void DisplayServant(ServantVO s)
 {
     if (s != null)
     {
         nameText.text           = s.NameAndTitle;
         servantThumbnail.sprite = servantSpriteList[0];
         Debug.Log("Our Servant is " + s.NameAndTitle);
     }
     else
     {
         Debug.Log("Don't have a servant for this button!");
     }
 }
Ejemplo n.º 3
0
    public void FireServant()
    {
        ServantVO servant = servantList.selectedServant;

        if (servant != null)
        {
            if (servant.Status != ServantStatus.Permanent)
            {
                AmbitionApp.SendMessage <ServantVO>(ServantMessages.FIRE_SERVANT, servantList.selectedServant);
                servantList.ClearInventoryButtons();
                servantList.GenerateInventoryButtons();
            }
            else if (!attemptedCamilleFiring)   //If the Player hasn't attempted to fire Camille yet then throw up this message bubble
            {
                attemptedCamilleFiring = true;
                AmbitionApp.OpenMessageDialog(DialogConsts.FIRE_CAMILLE_DIALOG);
            }
        }
    }
Ejemplo n.º 4
0
 // Use this for initialization
 void Awake()
 {
     _model = AmbitionApp.GetModel <ServantModel>();
     GenerateInventoryButtons();
     selectedServant = null;
 }
Ejemplo n.º 5
0
        // Checks both the "equipped" servant titles and the names of the servants employed
        public static bool Check(RequirementVO req)
        {
            ServantVO servant = AmbitionApp.GetModel <ServantModel>().GetServant(req.ID);

            return(RequirementsSvc.Check(req, (int)(servant?.Status ?? ServantStatus.Unknown)));
        }