mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-19 02:24:37 +08:00
add EcsAspect events
This commit is contained in:
parent
9d5be80190
commit
5b9fbbd62a
@ -127,7 +127,6 @@ namespace DCFApixels.DragonECS
|
|||||||
internal EcsWorld _source;
|
internal EcsWorld _source;
|
||||||
internal EcsMask _mask;
|
internal EcsMask _mask;
|
||||||
private bool _isBuilt = false;
|
private bool _isBuilt = false;
|
||||||
//private IEcsPool[] _pools;
|
|
||||||
|
|
||||||
#region Properties
|
#region Properties
|
||||||
public EcsMask Mask
|
public EcsMask Mask
|
||||||
@ -232,6 +231,7 @@ namespace DCFApixels.DragonECS
|
|||||||
builtinAspect._source = world;
|
builtinAspect._source = world;
|
||||||
builtinAspect.Init(builder);
|
builtinAspect.Init(builder);
|
||||||
}
|
}
|
||||||
|
OnInit(newAspect, builder);
|
||||||
|
|
||||||
//Build Mask
|
//Build Mask
|
||||||
if (staticMask == null)
|
if (staticMask == null)
|
||||||
@ -253,6 +253,9 @@ namespace DCFApixels.DragonECS
|
|||||||
}
|
}
|
||||||
|
|
||||||
_constructorBuildersStackIndex--;
|
_constructorBuildersStackIndex--;
|
||||||
|
|
||||||
|
OnAfterInit(newAspect, mask);
|
||||||
|
|
||||||
return (newAspect, mask);
|
return (newAspect, mask);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@ -430,6 +433,14 @@ namespace DCFApixels.DragonECS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region Events
|
||||||
|
public delegate void OnInitApectHandler(object aspect, Builder builder);
|
||||||
|
public static event OnInitApectHandler OnInit = delegate { };
|
||||||
|
|
||||||
|
public delegate void OnBuildApectHandler(object aspect, EcsMask mask);
|
||||||
|
public static event OnBuildApectHandler OnAfterInit = delegate { };
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
#region EcsAspect.Builder.Extensions
|
#region EcsAspect.Builder.Extensions
|
||||||
|
Loading…
Reference in New Issue
Block a user