Added an event when a newly created draw object finishes CharacterBase.Create.

This commit is contained in:
Ottermandias 2022-08-16 15:30:05 +02:00
parent 5b5a1e2fd8
commit 80edfe7804
6 changed files with 54 additions and 153 deletions

View file

@ -18,6 +18,7 @@ public unsafe partial class PathResolver
public class DrawObjectState
{
public static event CreatingCharacterBaseDelegate? CreatingCharacterBase;
public static event CreatedCharacterBaseDelegate? CreatedCharacterBase;
public IEnumerable< KeyValuePair< IntPtr, (ModCollection, int) > > DrawObjects
=> _drawObjectToObject;
@ -147,6 +148,7 @@ public unsafe partial class PathResolver
if( LastGameObject != null )
{
_drawObjectToObject[ ret ] = ( _lastCreatedCollection!, LastGameObject->ObjectIndex );
CreatedCharacterBase?.Invoke( ( IntPtr )LastGameObject, _lastCreatedCollection!, ret );
}
return ret;