public Boolean SystemIsEnabled <T>() where T : SystemBase { var system = FindSystem <T>(); if (system.Item0 == null) { return(false); } return(BitSet256.IsSet(&_globals->Systems, system.Item1)); }
public void OnCharacterDestroy(Character *entity) { var array = _f._ISignalOnCharacterDestroySystems; var systems = &(_f._globals->Systems); for (Int32 i = 0; i < array.Length; ++i) { var s = array[i]; if (BitSet256.IsSet(systems, s.RuntimeIndex)) { s.OnCharacterDestroy(_f, entity); } } }
public void OnProjectileCreated(Projectile *entity) { var array = _f._ISignalOnProjectileCreatedSystems; var systems = &(_f._globals->Systems); for (Int32 i = 0; i < array.Length; ++i) { var s = array[i]; if (BitSet256.IsSet(systems, s.RuntimeIndex)) { s.OnProjectileCreated(_f, entity); } } }
public void OnDamageBefore(DamageData *dmg) { var array = _f._ISignalOnDamageBeforeSystems; var systems = &(_f._globals->Systems); for (Int32 i = 0; i < array.Length; ++i) { var s = array[i]; if (BitSet256.IsSet(systems, s.RuntimeIndex)) { s.OnDamageBefore(_f, dmg); } } }
public void OnTriggerDynamic(DynamicCollisionInfo info) { var array = _f._ISignalOnTriggerDynamicSystems; var systems = &(_f._globals->Systems); for (Int32 i = 0; i < array.Length; ++i) { var s = array[i]; if (BitSet256.IsSet(systems, s.RuntimeIndex)) { s.OnTriggerDynamic(_f, info); } } }
public void OnNavMeshTargetReached(Core.NavMeshAgent *agent, Entity *entity) { var array = _f._ISignalOnNavMeshTargetReachedSystems; var systems = &(_f._globals->Systems); for (Int32 i = 0; i < array.Length; ++i) { var s = array[i]; if (BitSet256.IsSet(systems, s.RuntimeIndex)) { s.OnNavMeshTargetReached(_f, agent, entity); } } }
public void SystemDisable <T>() where T : SystemBase { var system = FindSystem <T>(); if (system.Item0 == null) { return; } if (BitSet256.IsSet(&_globals->Systems, system.Item1)) { // clear flag BitSet256.Clear(&_globals->Systems, system.Item1); try { system.Item0.OnDisabled(this); } catch (Exception exn) { Log.Exception(exn); } } }