public static void ReleaseInstanceRef( InstanceTransformRef reference ) { foreach ( var kvp in instancedModels ) { if ( kvp.Value.ContainsRef( reference ) ) kvp.Value.RemoveInstance( reference ); } }
public int Waypoint; // Current waypoint in the path #endregion Fields #region Constructors public Entity( int index ) { Index = index; Transform = new InstanceTransformRef(); Type = EntityType.Civilian; HalfSize = 1f; AABB = new AABB(); NextPosition = Vector3.Zero; NextAngle = 0f; ListNode = null; Direction = Vector3.Zero; StateTime = 0; StateDuration = 0; Behavior = null; Collision = 0; Path = new List<Vector2>( 60 ); Waypoint = -1; MoveSpeed = 1f; Beacon = null; BeaconVersion = 0; }
public void RemoveInstance( InstanceTransformRef reference ) { instances[reference.index] = instances[--instanceCount]; }
public bool ContainsRef( InstanceTransformRef reference ) { return ( reference.array == instances && reference.index < instanceCount ); }