/// <summary> /// Displays the class, level, and EXP of a partyMember /// </summary> /// <param name="pm"></param> public void InitRewardsDisplay(PartyMemberVisualController pmvc) { this.pmvc = pmvc; classIcon.sprite = pmvc.partyMemberSprite; LVLBackground.color = pmvc.partyMemberColour; pmvc.SetPartyMemberDisplayRewardsPanel(this, PanelConstants.REWARDSPANEL, EXPBar, LVLText); SetInteractable(false, true); }
/// <summary> /// Set isOpen to false on disabling so relevant interactions don't happen /// </summary> void OnDisable() { isOpen = false; if (this.pmvc) { this.pmvc.UnsetEXPBar(PanelConstants.STATSPANEL); this.pmvc.UnsetHPAndMPBar(PanelConstants.STATSPANEL); this.pmvc = null; } }
/// <summary> /// Sets the displayed candles of a partyMember /// </summary> /// <param name="pm"> PartyMember who's equipped gear should be displayed </param> public void Init(PartyMember pm) { if (this.pmvc != null) // will be null on first open { if (this.pmvc.activeCandles[0] != null) { activeCandles[0].HideItem(); } if (this.pmvc.activeCandles[1] != null) { activeCandles[1].HideItem(); } if (this.pmvc.activeCandles[2] != null) { activeCandles[2].HideItem(); } } pmvc = pm.pmvc; if (pmvc.activeCandles[0] != null) { activeCandles[0].ShowItem(pmvc.activeCandles[0]); } else { activeCandles[0].PlaceItemInstant(pm.activeCandles[0]); } if (pmvc.activeCandles[1] != null) { activeCandles[1].ShowItem(pmvc.activeCandles[1]); } else { activeCandles[1].PlaceItemInstant(pm.activeCandles[1]); } if (pmvc.activeCandles[2] != null) { activeCandles[2].ShowItem(pmvc.activeCandles[2]); } else { activeCandles[2].PlaceItemInstant(pm.activeCandles[2]); } if (activeCandles[0].b.interactable == true) // if the panel is not interactable, don't set the use buttons (which will be set when interactability is true) { SetUsables(); } activeCandles[0].SetColour(pmvc.partyMemberColour); activeCandles[1].SetColour(pmvc.partyMemberColour); activeCandles[2].SetColour(pmvc.partyMemberColour); }
public PartyMemberVisualController pmvc = null; /// <value> Controller for all visuals related to partyMember </value> /// <summary> /// Initialize all the bars of the active partyMember /// </summary> /// <param name="pm"></param> public void DisplayPartyMember(PartyMemberVisualController pmvc) { if (this.pmvc != null) // forget what this was for { this.pmvc.UnsetHPAndMPBar(GetPanelName()); } pmvc.SetHPAndMPBar(GetPanelName(), HPBar, MPBar); //pmvc.SetStatusBar(seBar); this.pmvc = pmvc; }
/// <summary> /// Displays the amount of skill pointsa partyMember has /// </summary> /// <param name="pmvc"></param> /// <param name="skillPoints"></param> public void InitSkillsDisplay(PartyMemberVisualController pmvc, int skillPoints) { if (pmvc.pmdSkillsPanel == null) { this.pmvc = pmvc; classIcon.sprite = pmvc.partyMemberSprite; backgroundSelectedColor = new Color32(pmvc.partyMemberColour.r, pmvc.partyMemberColour.g, pmvc.partyMemberColour.b, 100); pmvc.SetPartyMemberDisplaySkillsPanel(this); } UpdateSkillPointsText(skillPoints); }
/// <summary> /// Sets the displayed weapon, secondary, and armour of a partyMember /// </summary> /// <param name="pm"> PartyMember who's equipped gear should be displayed </param> public void Init(PartyMember pm) { if (this.pmvc != null) // will be null on first open { if (this.pmvc.weapon != null) { weaponSlot.HideItem(); } if (this.pmvc.secondary != null) { secondarySlot.HideItem(); } if (this.pmvc.armour != null) { armourSlot.HideItem(); } } pmvc = pm.pmvc; if (pmvc.weapon != null) { weaponSlot.ShowItem(pmvc.weapon); } else { weaponSlot.PlaceItemInstant(pm.weapon); } if (pmvc.secondary != null) { secondarySlot.ShowItem(pmvc.secondary); } else { secondarySlot.PlaceItemInstant(pm.secondary); } if (pmvc.armour != null) { armourSlot.ShowItem(pmvc.armour); } else { armourSlot.PlaceItemInstant(pm.armour); } weaponSlot.SetColour(pmvc.partyMemberColour); secondarySlot.SetColour(pmvc.partyMemberColour); armourSlot.SetColour(pmvc.partyMemberColour); }
/// <summary> /// Displays the class, health, and mana of a partyMember /// </summary> /// <param name="pm"></param> public void Init(PartyMemberVisualController pmvc) { if (pmvc.pmdPartyPanel == null) { this.pmvc = pmvc; classIcon.sprite = pmvc.partyMemberSprite; backgroundSelectedColor = new Color32(pmvc.partyMemberColour.r, pmvc.partyMemberColour.g, pmvc.partyMemberColour.b, 100); pmvc.SetPartyMemberDisplay(this, PanelConstants.PARTYPANEL, HPBar, MPBar); } else { pmvc.UpdateHPAndMPBar(PanelConstants.PARTYPANEL); } }
/// <summary> /// Initialize the stats panel to display the stats of a given partyMember. /// This includes HP, MP, and EXP bars. /// </summary> /// <param name="pmvc"></param> public void Init(PartyMemberVisualController pmvc) { if (this.pmvc != null) { this.pmvc.UnsetEXPBar(PanelConstants.STATSPANEL); this.pmvc.UnsetHPAndMPBar(PanelConstants.STATSPANEL); } this.pmvc = pmvc; pmvc.SetEXPBar(PanelConstants.STATSPANEL, pmEXPBar); pmvc.SetHPAndMPBar(PanelConstants.STATSPANEL, HPBar, MPBar); int[] stats = pmvc.GetStats(); headerBackground.color = pmvc.partyMemberColour; headerText.SetText(pmvc.GetPartyMemberName() + " " + LVLText + " " + stats[0]); nextLVLBackground.color = EventManager.instance.GetSecondaryThemeColour(); SetPartyMemberStats(pmvc.GetStats()); }