Exemplo n.º 1
0
        public void UpdateKillCount(BaseCharacter character, float creditPercent)
        {
            //Debug.Log("KillObjective.UpdateKillCount()");

            bool completeBefore = IsComplete;

            if (completeBefore)
            {
                return;
            }

            // INVESTIGATE IF STRING MATCH CAN BE REPLACED WITH TYPE.GETTYPE DIRECT MATCH
            if (character.GetType() == Type.GetType(MyType) || SystemResourceManager.MatchResource(character.CharacterName, MyType) || SystemResourceManager.MatchResource(character.Faction.DisplayName, MyType))
            {
                CurrentAmount++;
                quest.CheckCompletion();
                if (CurrentAmount <= MyAmount && !quest.MyIsAchievement && CurrentAmount != 0)
                {
                    MessageFeedManager.MyInstance.WriteMessage(string.Format("{0}: {1}/{2}", DisplayName, Mathf.Clamp(CurrentAmount, 0, MyAmount), MyAmount));
                }
                if (completeBefore == false && IsComplete && !quest.MyIsAchievement)
                {
                    MessageFeedManager.MyInstance.WriteMessage(string.Format("Learn {0} {1}: Objective Complete", CurrentAmount, DisplayName));
                }
            }
        }
Exemplo n.º 2
0
        public void UpdateKillCount(BaseCharacter character, float creditPercent)
        {
            //Debug.Log("KillObjective.UpdateKillCount()");

            bool completeBefore = IsComplete;

            if (completeBefore)
            {
                return;
            }

            if (character.GetType() == Type.GetType(MyType) || SystemResourceManager.MatchResource(character.MyCharacterName, MyType) || SystemResourceManager.MatchResource(character.MyFactionName, MyType))
            {
                MyCurrentAmount++;
                quest.CheckCompletion();
                if (MyCurrentAmount <= MyAmount && !quest.MyIsAchievement && MyCurrentAmount != 0)
                {
                    MessageFeedManager.MyInstance.WriteMessage(string.Format("{0}: {1}/{2}", MyType, Mathf.Clamp(MyCurrentAmount, 0, MyAmount), MyAmount));
                }
                if (completeBefore == false && IsComplete && !quest.MyIsAchievement)
                {
                    MessageFeedManager.MyInstance.WriteMessage(string.Format("Learn {0} {1}: Objective Complete", MyCurrentAmount, MyType));
                }
            }
        }