Beispiel #1
0
        public static void Load()
        {
            var spawn = ObjectManager.Get<Obj_SpawnPoint>().Where(s => s.IsEnemy).FirstOrDefault();
            SpawnPoint = spawn != null ? spawn.Position : Vector3.Zero;

            foreach (var enemy in HeroManager.Enemies)
            {
                var eStruct = new LastPositionStruct(enemy) { LastPosition = SpawnPoint };
                LastPositions.Add(eStruct);
            }

            Obj_AI_Base.OnTeleport += Obj_AI_Base_OnTeleport;
            Game.OnUpdate += Game_OnUpdate;
        }
Beispiel #2
0
        public static void Load()
        {
            var spawn = ObjectManager.Get <Obj_SpawnPoint>().Where(s => s.IsEnemy).FirstOrDefault();

            SpawnPoint = spawn != null ? spawn.Position : Vector3.Zero;

            foreach (var enemy in HeroManager.Enemies)
            {
                var eStruct = new LastPositionStruct(enemy)
                {
                    LastPosition = SpawnPoint
                };
                LastPositions.Add(eStruct);
            }

            Obj_AI_Base.OnTeleport += Obj_AI_Base_OnTeleport;
            Game.OnUpdate          += Game_OnUpdate;
        }