示例#1
0
 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);
    }
示例#3
0
 private void Look(mazeDirection direction)
 {
     transform.localRotation = direction.ToRotation();
     currentDirection        = direction;
 }