public virtual void Initialize(mazeCell cell, mazeCell otherCell, mazeDirection direction) { this.cell = cell; this.otherCell = otherCell; this.direction = direction; cell.SetEdge(direction, this); transform.parent = cell.transform; transform.localPosition = Vector3.zero; transform.localRotation = direction.ToRotation(); }
public virtual void Initialise(MazeCell _cell, MazeCell _otherCell, mazeDirection _direction) { this.cell = _cell; this.otherCell = _otherCell; this.direction = _direction; transform.parent = _cell.transform; transform.localPosition = Vector3.zero; transform.localRotation = _direction.ToRotation(); //Cell should know about the edge too, Smart edge yayy _cell.SetEdge(this, _direction); }
private void Look(mazeDirection direction) { transform.localRotation = direction.ToRotation(); currentDirection = direction; }