Changeset 402 for binary-improvements2/WebServer/src/LiveData
- Timestamp:
- Jan 27, 2023, 7:28:00 PM (22 months ago)
- 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 {1 namespace Webserver.LiveData { 2 2 public class Animals : EntityFilterList<EntityAnimal> { 3 3 public static readonly Animals Instance = new Animals (); 4 4 5 5 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 ()) { 8 7 return ea; 9 8 } -
binary-improvements2/WebServer/src/LiveData/EntityFilterList.cs
r325 r402 2 2 using System.Collections.Generic; 3 3 4 namespace AllocsFixes.LiveData {4 namespace Webserver.LiveData { 5 5 public abstract class EntityFilterList<T> where T : Entity { 6 6 public void Get (List<T> _list) { -
binary-improvements2/WebServer/src/LiveData/Hostiles.cs
r326 r402 1 namespace AllocsFixes.LiveData {1 namespace Webserver.LiveData { 2 2 public class Hostiles : EntityFilterList<EntityEnemy> { 3 3 public static readonly Hostiles Instance = new Hostiles (); 4 4 5 5 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 ()) { 8 7 return enemy; 9 8 }
Note:
See TracChangeset
for help on using the changeset viewer.