Пример #1
0
        private void OnWildEncounter(EncounterResult encounterResult)
        {
            _activeEncounterResult = encounterResult;

            EncounterStarted = true;

            (_shader as WorldShader).StartEncounter();
            (_shader as WorldShader).EncounterAnimationFinished += EncounterFlashAnimationFinished;
        }
    public void ShowResult(EncounterResult result, Action closeCallback)
    {
        _closeCallback = closeCallback;

        headerText.text = result.wasSucceded ? "Success!" : "Failed ...";
        descText.text   = result.endText;

        gameObject.SetActive(true);
    }
Пример #3
0
 public Statistics(DateTimeOffset fightStart, Player logAuthor, EncounterResult encounterResult, EncounterMode encounterMode, Encounter encounter,
                   string logVersion, TimeSpan encounterDuration)
 {
     Encounter         = encounter;
     LogVersion        = logVersion;
     EncounterResult   = encounterResult;
     EncounterMode     = encounterMode;
     FightStart        = fightStart;
     LogAuthor         = logAuthor;
     EncounterDuration = encounterDuration;
 }
Пример #4
0
        internal LogData(FileInfo fileInfo, IEnumerable <LogPlayer> players, string encounterName,
                         EncounterResult encounterResult,
                         DateTimeOffset encounterStartTime, TimeSpan encounterDuration, long parseMilliseconds = -1)
        {
            FileInfo           = fileInfo;
            Players            = players.ToArray();
            EncounterResult    = encounterResult;
            EncounterName      = encounterName;
            EncounterStartTime = encounterStartTime;
            EncounterDuration  = encounterDuration;

            ParseTime         = DateTimeOffset.Now;
            ParseMilliseconds = parseMilliseconds;
        }
Пример #5
0
        public TimeSpan GetAverageTimeByResult(EncounterResult result)
        {
            if (!LogCountsByResult.TryGetValue(result, out int resultCount))
            {
                resultCount = 1;
            }

            if (!TimeSpentByResult.TryGetValue(result, out TimeSpan time))
            {
                time = TimeSpan.Zero;
            }

            return(new TimeSpan(time.Ticks / resultCount));
        }
Пример #6
0
        public LogStatistics(DateTimeOffset fightStart, Player logAuthor, IEnumerable <PlayerData> playerData,
                             IEnumerable <PhaseStats> phaseStats, SquadDamageData fullFightSquadDamageData,
                             IEnumerable <TargetSquadDamageData> fullFightTargetDamageData, BuffData buffData,
                             EncounterResult encounterResult, string encounterName, string logVersion,
                             IReadOnlyDictionary <string, int> eventCounts, IEnumerable <Agent> agents, IEnumerable <Skill> skills)
        {
            EncounterName            = encounterName;
            LogVersion               = logVersion;
            EncounterResult          = encounterResult;
            EventCounts              = eventCounts;
            FightStart               = fightStart;
            LogAuthor                = logAuthor;
            PlayerData               = playerData.ToArray();
            FullFightSquadDamageData = fullFightSquadDamageData;
            BuffData = buffData;
            FullFightBossDamageData = fullFightTargetDamageData.ToArray();

            PhaseStats  = phaseStats as PhaseStats[] ?? phaseStats.ToArray();
            FightTimeMs = PhaseStats.Sum(x => x.PhaseDuration);
            Agents      = agents as Agent[] ?? agents.ToArray();
            Skills      = skills as Skill[] ?? skills.ToArray();
        }
Пример #7
0
 public override void FinishEncounter(EncounterResult result)
 {
     Debug.Log("Trap finished");
     _controller.ShowResult(result);
 }
 public void ShowResult(EncounterResult result)
 {
     resultController.ShowResult(result, CloseEncounter);
 }
Пример #9
0
 public abstract void FinishEncounter(EncounterResult result);
Пример #10
0
		private void Exit(EncounterResult result)
		{
			_result	= result;
			Close();
		}
Пример #11
0
 public override void FinishEncounter(EncounterResult result)
 {
 }
Пример #12
0
 public override void FinishEncounter(EncounterResult result)
 {
     Debug.Log("Gift taken");
     _controller.ShowResult(result);
 }
Пример #13
0
		private void btnYield_Click(object sender, System.EventArgs e)
		{
			if ((_result = game.EncounterVerifyYield(this)) != EncounterResult.Continue)
				Close();
		}
Пример #14
0
		private void btnSurrender_Click(object sender, System.EventArgs e)
		{
			DisableAuto();

			if ((_result = game.EncounterVerifySurrender(this)) != EncounterResult.Continue)
				Close();
		}
Пример #15
0
 public ConstantResultDeterminer(EncounterResult result)
 {
     this.result = result;
 }
Пример #16
0
 public ResultDeterminerResult(EncounterResult encounterResult, long?time)
 {
     EncounterResult = encounterResult;
     Time            = time;
 }
Пример #17
0
		private void ExecuteAction()
		{
			if ((_result = game.EncounterExecuteAction(this)) == EncounterResult.Continue)
			{
				UpdateButtons();
				UpdateShipStats();

				lblEncounter.Text	= game.EncounterText;
				lblAction.Text		= game.EncounterAction;

				if (game.EncounterContinueFleeing || game.EncounterContinueAttacking)
					tmrTick.Start();
			}
			else
				Close();
		}