예제 #1
0
    private void GenerateLog(int op, IntVector2 currentCoordinates)
    {
        BaseGridCell designatedCell =
            cells[currentCoordinates.x, currentCoordinates.z];
        int heightBeforeOp = designatedCell.height;

        int[,] target = DrawingHandler.GetComponent <DrawingHandler>().height;
        int targetHeight = target[currentCoordinates.x, currentCoordinates.z];

        if (op == 1)
        {
            if (heightBeforeOp < targetHeight)
            {
                BlockBuilderLog.Log(logPath, id, "Correct Addition");
            }
            else
            {
                BlockBuilderLog.Log(logPath, id, "Incorrect Addition");
            }
        }
        else
        {
            if (heightBeforeOp > targetHeight)
            {
                BlockBuilderLog.Log(logPath, id, "Correct Deletion");
            }
            else
            {
                BlockBuilderLog.Log(logPath, id, "Incorrect Deletion");
            }
        }
    }
예제 #2
0
 // Use this for initialization
 void Start()
 {
     id             = DataUtil.GetCurrentRoomId();
     DrawingHandler = GameObject.Find("Drawing Handler");
     logPath        = Path.Combine(Application.persistentDataPath, "Logs/Block Builder/Block Builder.txt");
     startTime      = Time.time;
     BlockBuilderLog.Log(logPath, id, "Entered Level...!!!");
 }
예제 #3
0
 public void OnCompleteBlockBuilderPuzzle()
 {
     isCompleted = true;
     BlockBuilderLog.Log(logPath, id, "Completed Level...!!!");
     UnhighlightCell(currentCoordinates);
 }