Пример #1
0
 /**
  * Updates this observation
  * @param itype type of the sprite of this observation
  * @param id ID of the observation.
  * @param pos position of the sprite.
  * @param posReference reference to compare this position to others.
  * @param category category of this observation (NPC, static, resource, etc.)
  */
 public void update(string stype, int id, Vector2 pos, Vector2 posReference, VGDLUtils.VGDLSpriteCategory category)
 {
     this.stype     = stype;
     this.obsID     = id;
     this.position  = pos;
     this.reference = posReference;
     sqDist         = (pos - posReference).sqrMagnitude;
     this.category  = category;
 }
Пример #2
0
 public Observation()
 {
     // used for learning track
     category  = VGDLUtils.VGDLSpriteCategory.TYPE_UNINITIALIZED;
     stype     = "";
     obsID     = -1;
     position  = new Vector2();
     reference = Vector2.negativeInfinity;
     sqDist    = -1;
 }