예제 #1
0
 public static void ReleaseInstanceRef( InstanceTransformRef reference )
 {
     foreach ( var kvp in instancedModels )
       {
     if ( kvp.Value.ContainsRef( reference ) )
       kvp.Value.RemoveInstance( reference );
       }
 }
예제 #2
0
파일: Entity.cs 프로젝트: yxrkt/outbreak
        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;
        }
예제 #3
0
 public void RemoveInstance( InstanceTransformRef reference )
 {
     instances[reference.index] = instances[--instanceCount];
 }
예제 #4
0
 public bool ContainsRef( InstanceTransformRef reference )
 {
     return ( reference.array == instances && reference.index < instanceCount );
 }