Esempio n. 1
0
        void OnPartyReady(IEventInfo a_info)
        {
            PartyInfo partyInfo = a_info as PartyInfo;

            if (partyInfo != null && partyInfo.partySlot == partySlot)
            {
                //Debug.Log("ON PARTY READY FOR " + partyInfo.partySlot);

                // There can only be one party ready at a time, so unready all others
                for (int i = 0; i < BattleManager.Instance.PartyMembers.Length; ++i)
                {
                    ePartySlot currSlot = (ePartySlot)i;

                    if (partyInfo.partySlot != currSlot)
                    {
                        EventManager.TriggerEvent("PartyUnready", new PartyInfo {
                            partySlot = currSlot
                        });
                    }
                }

                // Update action panel data
                ReferenceManager.Instance.actionPanelName.text = battleProfile.EntityName;

                // Visually move into ready position
                gameObject.transform.localPosition = new Vector3(gameObject.transform.localPosition.x, readyOffset, gameObject.transform.localPosition.z);
            }
        }
Esempio n. 2
0
        void OnPartyUnready(IEventInfo a_info)
        {
            PartyInfo partyInfo = a_info as PartyInfo;

            if (partyInfo != null && partyInfo.partySlot == partySlot || partyInfo.partySlot == ePartySlot.NONE)
            {
                // Reset position to default
                gameObject.transform.localPosition = Vector3.zero;
            }
        }
        void OnPartyUnconscious(IEventInfo a_info)
        {
            PartyInfo partyInfo = a_info as PartyInfo;

            if (partyInfo != null)
            {
                // Go to next party member if was in active slot
                if (partyInfo.partySlot == CurrPartySlot)
                {
                    EventManager.TriggerEvent("NextPartyMember");
                }

                /// Party member has fainted, tint the whole screen and activate death highlights
                var actionUI = ReferenceManager.Instance.actionPanel.GetComponentsInChildren <Image>();

                foreach (var aui in actionUI)
                {
                    aui.color = DeathTint;
                }

                var dialogUI = ReferenceManager.Instance.dialogPanel.GetComponentsInChildren <Image>();

                foreach (var dui in dialogUI)
                {
                    dui.color = DeathTint;
                }

                var partyUI = ReferenceManager.Instance.partyPanel.GetComponentsInChildren <Image>();

                foreach (var pui in partyUI)
                {
                    if (pui.CompareTag("Highlight"))
                    {
                        pui.color = DeathHighlight;
                    }
                    else
                    {
                        pui.color = DeathTint;
                    }
                }
            }
        }