Exemple #1
0
 public static void AddRepresentation(EntityRepresentation entityRepresentation)
 {
     if (Count < EntitiesCollection.Count)
     {
         EntitiesCollection[Count++] = entityRepresentation;
     }
     else
     {
         EntitiesCollection.Add(entityRepresentation);
         Count = EntitiesCollection.Count;
     }
 }
Exemple #2
0
 /// <summary>
 /// Function called by the EntityManager to store the previous state
 /// of the Entity for interpolation
 /// </summary>
 public override void PreUpdate(float FixedFrequencyTime)
 {
     if (lastTransforms == null)
     {
         lastTransforms = new TransformData[2];
     }
     // Store the previous world matrix
     newTransformIndex = OldTransformIndex();
     lastTransforms[newTransformIndex] = new TransformData(
         transform.localPosition,
         transform.localRotation,
         transform.localScale);
     // Notify our EntityRepresentation
     EntityRepresentation.PreUpdate(FixedFrequencyTime);
     // Reset changed flag for next frame
     Changed = EChange.None;
 }