コード例 #1
0
        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;
        }
コード例 #2
0
 public bool Equals(FieldCoords otherPoint) => otherPoint.X == X && otherPoint.Y == Y;