Exemplo n.º 1
0
 private void ValidateZ(ZValidityState minimumValidityState)
 {
     if (this.State >= minimumValidityState)
     {
         return;
     }
     EngineApplicationInterface.IScene.WorldPositionValidateZ(ref this, (int)minimumValidityState);
 }
Exemplo n.º 2
0
 public void SetVec3(UIntPtr navMesh, Vec3 position, bool hasValidZ)
 {
     this.NavMesh        = navMesh;
     this.NearestNavMesh = this.NavMesh;
     this.Position       = position;
     this.Normal         = Vec3.Zero;
     if (hasValidZ)
     {
         this.LastValidZPosition = this.Position.AsVec2;
         this.State = ZValidityState.Valid;
     }
     else
     {
         this.LastValidZPosition = Vec2.Invalid;
         this.State = ZValidityState.Invalid;
     }
 }
Exemplo n.º 3
0
 public WorldPosition(TaleWorlds.Engine.Scene scene, UIntPtr navMesh, Vec3 position, bool hasValidZ)
 {
     this.Scene          = scene != null ? scene.Pointer : UIntPtr.Zero;
     this.NavMesh        = navMesh;
     this.NearestNavMesh = this.NavMesh;
     this.Position       = position;
     this.Normal         = Vec3.Zero;
     if (hasValidZ)
     {
         this.LastValidZPosition = this.Position.AsVec2;
         this.State = ZValidityState.Valid;
     }
     else
     {
         this.LastValidZPosition = Vec2.Invalid;
         this.State = ZValidityState.Invalid;
     }
 }
Exemplo n.º 4
0
 public void SetVec2(Vec2 value)
 {
     if (!(this.Position.AsVec2 != value))
     {
         return;
     }
     if (this.State != ZValidityState.Invalid)
     {
         this.State = ZValidityState.Invalid;
     }
     else if (!this.LastValidZPosition.IsValid)
     {
         this.ValidateZ(ZValidityState.ValidAccordingToNavMesh);
         this.State = ZValidityState.Invalid;
     }
     this.Position.x = value.x;
     this.Position.y = value.y;
 }