public void CreateNext() { if (LastElement == null) { return; } FieldCoords nextDir = Random.value > 0.5f ? FieldCoords.Top : FieldCoords.Right; FieldCoords nextPos = LastElement.Coords + nextDir; FieldElement next = _elementsFactory.Create(nextPos); next.Entity.Behaiour.SelectState(BehaiourState.Create); LastElement = next; }
public bool Equals(FieldCoords otherPoint) => otherPoint.X == X && otherPoint.Y == Y;