// todo -- get all spawnpoints from xml ^^

        protected override bool Initialize()
        {
            "Initializing L.S. Noir Callout: Sexual Assault -- Stage 1 [CSI]".AddLog();

            _betteremsSupport = Main.BetterEmsFound;

            _sw.Start();

            // Resets previous Data
            Serializer.SaveItemToXML(new PedData(), Main.PDataPath);
            Serializer.SaveItemToXML(new PedData(), Main.SDataPath);
            Serializer.SaveItemToXML(new WitnessData(), Main.WDataPath);
            Serializer.SaveItemToXML(new CaseData(), Main.CDataPath);
            Serializer.SaveItemToXML(new EvidenceData(), Main.EDataPath);
            Serializer.SaveItemToXML(new ReportData(), Main.RDataPath);

            CsiCreator.CreateScene(Game.LocalPlayer.Character.Position);

            while (!CsiCreator.Completed && !CsiCreator.AComplete && !CsiCreator.CComplete && !CsiCreator.loadCreated)
            {
                GameFiber.Yield();
            }

            _caseData = Serializer.LoadItemFromXML <CaseData>(Main.CDataPath);

            UpdateandSaveCaseData();
            GameFiber.Sleep(1000);

            DisplayCallout();

            _dispEmsTo     = new Services.SpawnPoint(CsiCreator.EmsLast.Heading, CsiCreator.EmsLast.Position);
            _dispCoronerTo = new Services.SpawnPoint(CsiCreator.EmsLast.Heading, CsiCreator.EmsLast.Position);

            $"Case number: {_caseData.Number}".AddLog();

            _sw.Stop();
            ("***TIME_LOGGER: " + _sw.Elapsed.Seconds.ToString() + " to run Initialize()").AddLog();
            _sw.Reset();

            return(true);
        }
Example #2
0
 public float Distance2D(SpawnPoint spawn)
 => Vector3.Distance2D(Position, spawn.Position);