void AObject::Draw(int offset){ if(alive){ live_count_++; //1周期のカウンタを進める //右向き左向き変更処理 if(speed_.x>0) right=true; else if(speed_.x<0) right=false; if(speed_.y<0) aerial=true; //描画(アニメーション画像がある場合はアニメーション) if(right){ if(speed_.x>0 && move_ghandle_!=0 &&live_count_%2==0) DrawGraph( (int)pos_.x+offset , (int)pos_.y , move_ghandle_ ,TRUE ); else DrawGraph( (int)pos_.x+offset , (int)pos_.y , graphic_handle_ ,TRUE ) ; } else{ if(speed_.x<0 && move_ghandle_!=0 &&live_count_%2==0) DrawTurnGraph( (int)pos_.x+offset , (int)pos_.y , move_ghandle_ ,TRUE ); else DrawTurnGraph( (int)pos_.x+offset , (int)pos_.y , graphic_handle_ ,TRUE ) ; } } }
/// <summary> 反転した画像を複製します </summary> Texture copyMirror() { auto size = getSize(); dxlib_handle texture = MakeScreen(size.width, size.height, true); SwapScreen::Begin(texture); DrawTurnGraph(0, 0, handle, true); SwapScreen::End(); return Texture(texture); }