BWAPI
|
00001 #pragma once 00002 00003 #include "Interface.h" 00004 00005 #include "BufferedItem.h" 00006 00007 class BufferedLine : public BufferedItem 00008 { 00009 public: 00010 BufferedLine(BWAPI::CoordinateType::Enum coordType, BufferedCategory id, int time, int x1, int y1, int x2, int y2, BWAPI::Color color) 00011 : BufferedItem(coordType, id, time) 00012 , mX1(x1) 00013 , mY1(y1) 00014 , mX2(x2) 00015 , mY2(y2) 00016 , mColor(color) 00017 {} 00018 00019 virtual void draw() 00020 { 00021 BWAPI::Broodwar->drawLine(mCoordType, mX1, mY1, mX2, mY2, mColor); 00022 } 00023 00024 private: 00025 int mX1; 00026 int mY1; 00027 int mX2; 00028 int mY2; 00029 BWAPI::Color mColor; 00030 };