コード例 #1
0
 // for debugging
 void CreatePatternInput()
 {
     if (Input.GetKeyDown("space"))
     {
         path.AddStraight(stepDistance, 10, true);
         terrainGeneration.UpdateRoad(stepDistance);
     }
     if (Input.GetKeyDown("right"))
     {
         path.AddCorner(90, 20, 0, stepDistance);
         terrainGeneration.UpdateRoad(stepDistance);
     }
     if (Input.GetKeyDown("left"))
     {
         path.AddCorner(-90, 20, 0, stepDistance);
         terrainGeneration.UpdateRoad(stepDistance);
     }
     if (Input.GetKeyDown("down"))
     {
         path.AddDownFall(3, 20, stepDistance);
         terrainGeneration.UpdateRoad(stepDistance);
     }
     if (Input.GetKeyDown("up"))
     {
         path.AddLooping(20, roadSideOffset, stepDistance);
         terrainGeneration.UpdateRoad(stepDistance);
     }
 }