コード例 #1
0
 public void SpawnPiece(Type piece, Cell target)
 {
     if (target.IsSolidlyOccupied()) return;
     GameObject parent = GetPieceParent(piece);
     GameObject obj = (GameObject)PrefabUtility.InstantiatePrefab(GamePiece.GetPrefab(selectedPiece));
     obj.transform.position = target.WorldPos();
     obj.transform.parent = parent.transform;
     RoomManager.roomManager.AddPiece(obj, piece);
 }
コード例 #2
0
    public virtual bool TeleportTo(Cell target)
    {
        Cell currentCell = cell;
        if (target.IsSolidlyOccupied())return false;
        Detatch();

        return StartLerp(currentCell, target, teleportSpeed);
    }