瀏覽代碼

Add grass spawn on right click

DricomDragon 4 年之前
父節點
當前提交
63b39f9247
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      main.cpp

+ 4 - 0
main.cpp

@@ -130,6 +130,10 @@ int main()
 						putBloc(DESERT, world, cursorPos.y, cursorPos.x);
 						drawWorld(world, tileSet, map);
 					}
+					if (event.button.button == 3) {
+						putBloc(GRASS, world, cursorPos.y, cursorPos.x);
+						drawWorld(world, tileSet, map);
+					}
 					break;
 			} // end switch event type
 		} // end of message processing