Ignore:
Timestamp:
Jan 27, 2023, 7:28:00 PM (22 months ago)
Author:
alloc
Message:
  • Major refactoring
  • Using Utf8Json for (de)serialization
  • Moving APIs to REST
  • Removing dependencies from WebServer and MapRenderer to ServerFixes
Location:
binary-improvements2/WebServer/src/LiveData
Files:
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • binary-improvements2/WebServer/src/LiveData/Animals.cs

    r326 r402  
    1 namespace AllocsFixes.LiveData {
     1namespace Webserver.LiveData {
    22        public class Animals : EntityFilterList<EntityAnimal> {
    33                public static readonly Animals Instance = new Animals ();
    44
    55                protected override EntityAnimal predicate (Entity _e) {
    6                         EntityAnimal ea = _e as EntityAnimal;
    7                         if (ea != null && ea.IsAlive ()) {
     6                        if (_e is EntityAnimal ea && ea.IsAlive ()) {
    87                                return ea;
    98                        }
  • binary-improvements2/WebServer/src/LiveData/EntityFilterList.cs

    r325 r402  
    22using System.Collections.Generic;
    33
    4 namespace AllocsFixes.LiveData {
     4namespace Webserver.LiveData {
    55        public abstract class EntityFilterList<T> where T : Entity {
    66                public void Get (List<T> _list) {
  • binary-improvements2/WebServer/src/LiveData/Hostiles.cs

    r326 r402  
    1 namespace AllocsFixes.LiveData {
     1namespace Webserver.LiveData {
    22        public class Hostiles : EntityFilterList<EntityEnemy> {
    33                public static readonly Hostiles Instance = new Hostiles ();
    44
    55                protected override EntityEnemy predicate (Entity _e) {
    6                         EntityEnemy enemy = _e as EntityEnemy;
    7                         if (enemy != null && enemy.IsAlive ()) {
     6                        if (_e is EntityEnemy enemy && enemy.IsAlive ()) {
    87                                return enemy;
    98                        }
Note: See TracChangeset for help on using the changeset viewer.