コード例 #1
0
    public void ChangeFaceSize(CubeFace face, int XSize, int YSize)
    {
        FaceModel  faceModel = FaceModel.ModelsDictionary[face];
        IntVector3 sizes     = faceModel.GetRealSizes(XSize, YSize, balls.GetLength((int)faceModel.axes[2]));

        CreateBoard(sizes);
    }
コード例 #2
0
    public void OnTileClick(CubeFace face, int x, int y)
    {
        FaceModel  faceModel = FaceModel.ModelsDictionary[face];
        int        Z_SIZE    = faceModel.GetRealSizes(boardData.Sizes)[Axis.Z];
        IntVector3 position  = faceModel.GetRealCoords(new IntVector3(x, y, Z_SIZE - 1 - currentElevation), boardData.Sizes);

        if (position.X < boardData.X_SIZE && position.Y < boardData.Y_SIZE && position.Z < boardData.Z_SIZE)
        {
            MapClicksToCreation(face, x, y, position);
        }
        else
        {
            Debug.LogWarning("OutOfCube");
            Debug.Log(position.X + " vs " + boardData.X_SIZE);
            Debug.Log(position.Y + " vs " + boardData.Y_SIZE);
            Debug.Log(position.Z + " vs " + boardData.Z_SIZE);
        }
    }