public void DockPoint_Ctor() { var actual = new DockPoint(50, 100); Assert.Equal(50, actual.X); Assert.Equal(100, actual.Y); }
public void AttatchRoom(DockPoint dock) { DockPoint[] doors = GetDoor(dock.doorTag); doorIndex = Random.Range(0, doors.Length); doors[doorIndex].targetDock = dock; doors[doorIndex].AlignDock(); }
public void UnlinkDock() { if (targetDock == null) { return; } targetDock.targetDock = null; targetDock = null; }
/// <summary> /// Semi-Strong construction /// </summary> /// <param name="myGameUI">Game to which the node belongs</param> /// <param name="myDepth">Z-Order</param> public NodeBase(GameUI myGameUI, int myDepth) { if (myGameUI == null) throw new ArgumentNullException("myGameUI"); gameUI = myGameUI; depth = myDepth; dockPoint = DockPoint.Centre; size = new SizeInt(0, 0); currentAbsolute = VectorInt.Zero; isRemoved = false; }
public void DockPoint_ToString() { var actual = new DockPoint(50, 100).ToString(); Assert.Equal("50, 100", actual); }
public void LinkDock(DockPoint dockPoint) { targetDock = dockPoint; AlignDock(); dockPoint.targetDock = this; }