public FieldInstance(E_OverlapEvent overlapEvent, ObjectField objectField, WorldAnchor anchor) : base(objectField.CollisionWidth, objectField.CollisionHeigth, anchor) { this.objectField = objectField; this.overlapEvent = overlapEvent; vectorControl = new VectorControl(this); }
public FieldInstance FindForward(FieldInstance self, E_OverlapEvent overlapEvent) { SearchCondition condition = delegate(FieldInstance sample, ref bool stopSearch) { if (sample.ToLeft != self.ToLeft) { if (sample.overlapEvent == overlapEvent) { return true; } } return false; }; return Find(self, condition, self.ToLeft); }
public IEnumerable<FieldInstance> FindContacts(FieldInstance self, E_OverlapEvent overlapEvent) { SearchCondition condition = delegate(FieldInstance sample, ref bool stopSearch) { if (sample.PosX == self.PosX) { if (sample.ToLeft != self.ToLeft) { if (sample.overlapEvent == overlapEvent) { return true; } } } else { stopSearch = true; } return false; }; List<FieldInstance> ret = new List<FieldInstance>(); ret.AddRange(FindAll(self, condition, true)); ret.AddRange(FindAll(self, condition, false)); return ret; }
public FieldInstance(E_OverlapEvent overlapEvent, float width, float height, WorldAnchor anchor) : base(width, height, anchor) { this.overlapEvent = overlapEvent; vectorControl = new VectorControl(this); }
protected Automaton(E_OverlapEvent overlapEvent, ObjectField objectField, bool toLeft) : base(overlapEvent, objectField, toLeft) { this.commandQueue = new Dictionary<string, CommandSet>(); }