Browse Source

fixed a serious bug that sneaked in because I trust too much the refactoring tools that this time failed miserably

tags/Rel2b2
sebas77 6 years ago
parent
commit
23580f381d
5 changed files with 14 additions and 19 deletions
  1. +1
    -1
      Svelto.ECS/DataStructures/TypeSafeFasterListForECS.cs
  2. +1
    -1
      Svelto.ECS/EnginesRootEntities.cs
  3. +1
    -1
      Svelto.ECS/EntityDescriptor.cs
  4. +10
    -15
      Svelto.ECS/MultiEntityViewsEngine.cs
  5. +1
    -1
      Svelto.ECS/Sequencer.cs

+ 1
- 1
Svelto.ECS/DataStructures/TypeSafeFasterListForECS.cs View File

@@ -1,7 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using DesignByContract;
using DBC;
using Svelto.DataStructures;

namespace Svelto.ECS.Internal


+ 1
- 1
Svelto.ECS/EnginesRootEntities.cs View File

@@ -1,6 +1,6 @@
using System;
using System.Collections.Generic;
using DesignByContract;
using DBC;
using Svelto.DataStructures;
using Svelto.ECS.Internal;



+ 1
- 1
Svelto.ECS/EntityDescriptor.cs View File

@@ -1,5 +1,5 @@
using System;
using DesignByContract;
using DBC;
using Svelto.DataStructures;
using Svelto.ECS.Internal;



+ 10
- 15
Svelto.ECS/MultiEntityViewsEngine.cs View File

@@ -29,9 +29,8 @@ namespace Svelto.ECS

public override void Add(IEntityView entityView)
{
var castedEntityView = (U) entityView;
if (castedEntityView != null)
Add(castedEntityView);
if (entityView is U)
Add((U) entityView);
else
base.Add(entityView);
}
@@ -53,18 +52,16 @@ namespace Svelto.ECS

public override void Add(IEntityView entityView)
{
var castedEntityView = (V) entityView;
if (castedEntityView != null)
Add(castedEntityView);
if (entityView is V)
Add((V) entityView);
else
base.Add(entityView);
}

public override void Remove(IEntityView entityView)
{
var castedEntityView = (V) entityView;
if (castedEntityView != null)
Remove(castedEntityView);
if (entityView is V)
Remove((V) entityView);
else
base.Remove(entityView);
}
@@ -83,18 +80,16 @@ namespace Svelto.ECS

public override void Add(IEntityView entityView)
{
var castedEntityView = (W) entityView;
if (castedEntityView != null)
Add(castedEntityView);
if (entityView is W)
Add((W) entityView);
else
base.Add(entityView);
}

public override void Remove(IEntityView entityView)
{
var castedEntityView = (W) entityView;
if (castedEntityView != null)
Remove(castedEntityView);
if (entityView is W)
Remove((W) entityView);
else
base.Remove(entityView);
}


+ 1
- 1
Svelto.ECS/Sequencer.cs View File

@@ -42,7 +42,7 @@ namespace Svelto.ECS

public void Next<T>(IEngine engine, ref T param)
{
Next<T>(engine, ref param, Condition.Always);
Next(engine, ref param, Condition.Always);
}

public void Next<T>(IEngine engine, ref T param, int condition)


Loading…
Cancel
Save