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!"); }
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!"); } }
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); } } }
// Use this for initialization void Awake() { _model = AmbitionApp.GetModel <ServantModel>(); GenerateInventoryButtons(); selectedServant = null; }
// 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))); }