void CGoblin::Draw() { //auto pos = (task->GetComponent<CPlayer>(CGameManager::PlayerName, 0)->transform.GetPos()); //auto pos = (task->GetComponent<CScroll>(CGameManager::Scroll, 0)->transform.GetPos()); //auto pos = (transform.GetPos() - scroll + Point(CGameApplication::ScreenWidth / 2, CGameApplication::ScreenHeight / 2 - CMapRead::Size / 2), transform.GetScale()); //Rect(transform.GetPos(), transform.GetScale()).draw(ColorF(0, 255, 0)); //isCollision = true; auto atk = task->GetComponent<CPlayerAttack>(CGameManager::Attack, 0); auto goblin = task->GetComponent<CGoblin>(CEnemyManager::Goblin, 0); auto pos = (task->GetComponent<CScroll>(CGameManager::Scroll, 0)->transform.GetPos()); font(transform.GetPos() - pos).draw(0,100); if (Collision::RectToRect(transform.GetPos() - pos, transform.GetScale(), atk->transform.GetPos(), atk->transform.GetScale()) && atk->isCollision) { Rect(transform.GetPos() - pos, transform.GetScale())(TextureAsset(L"Goblin")).draw(ColorF(Palette::Yellow)); } else { Rect(transform.GetPos() - pos, transform.GetScale())(TextureAsset(L"Goblin")).draw(); } }
void Ship::draw() { int a = 255; if (muteki) a = 150; if (cnt % 10 < 5) TextureAsset(L"atoi")(0, 0, 300, 430).scale(0.2).drawAt(pos, Alpha(a)); else TextureAsset(L"atoi")(300, 0, 300, 430).scale(0.2).drawAt(pos, Alpha(a)); if (slowMove) Circle(pos, rad).draw({ 255, 0, 0, 255 }); }
void CParts::Draw() { TextureAsset(CResource::GetInstance().GetGraphic(CResource::GraphicType::PartsBackGraohic_1)). resize(Float2(120, 120)).draw(pos + framepos); PartsDraw(); TextureAsset(CResource::GetInstance().GetGraphic(CResource::GraphicType::PartsBackGraohic_2)). resize(Float2(120, 120)).draw(pos + framepos); }
void draw()const override{ texture.draw(); TextureAsset(L"Window").scale(Min(frameCount,10)/10.,Min(frameCount,10)/10.).drawAt(240, 320); double Zoom = -2.5 * Max(0., 10. - frameCount); (RetryButton.stretched(Zoom))(TextureAsset(L"Button")).draw(); (TweetButton.stretched(Zoom))(TextureAsset(L"Button")).draw(); (TitleButton.stretched(Zoom))(TextureAsset(L"Button")).draw(); if (frameCount > 10) { (FontAsset(L"Font"))(L"Score"+Format(m_data->score)).draw(100,100); } }
void TwitterButton::drawLeft(RoundRect shape, String const &text, int frame)const { shape.draw(HSV(0, 0.0, 1.00)); //FontAsset(FONT_ASSET_NAME).drawCenter(text, shape.rect.center, Palette::Black); TextureAsset(L"twitterIcon").scale(0.07).drawAt(shape.rect.center); }
void CDownStairs::Start() { if (!TextureAsset(L"DownStairs")) { TextureAsset::Register(L"DownStairs", L"engine/data/texture/MapChip/map_stair_down.png"); } }
void CFloor::Start() { if (!TextureAsset(L"Floor")) { TextureAsset::Register(L"Floor", L"engine/data/texture/MapChip/map_ground_batu_c.png"); } }
void CGameOverManager::Draw() { //Logo->drawCenter(L"げーむおーばー", Float2(CGameApplication::ScreenWidth / 2, 100), Palette::Royalblue); TextureAsset(L"Bad")/*.resize(CGameApplication::ScreenWidth, CGameApplication::ScreenHeight)*/.draw(); //(TextureAsset(L"GAMEOVER")).draw(CGameApplication::ScreenWidth / 2 - 350, 100); }
void CTopsManager::PartsDraw() { const Float2 BackPos = Float2(50, 70); if (select_id <= -1) return; TextureAsset(CResource::GetInstance().GetTops(select_id)).draw(BackPos); }
void CGroupManager::PartsDraw() { const Float2 BackPos = Float2(350, 150); if (select_id <= -1) return; TextureAsset(CResource::GetInstance().GetGroup(select_id)).draw(BackPos); }
void CAvatarManager::Draw() { TextureAsset(CResource::GetInstance().GetGraphic(CResource::GraphicType::BackGraphic)).draw(0,0); task->Draw(); task->Remove(); }
void TwitterButton::drawClicked(RoundRect shape, String const &text, int frame)const { static Point clickPoint; if (frame <= 1) { clickPoint = Mouse::Pos(); } shape.draw(HSV(0, 0.0, 0.85)); //FontAsset(FONT_ASSET_NAME).drawCenter(text, shape.rect.center, Palette::Black); TextureAsset(L"twitterIcon").scale(0.07).drawAt(shape.rect.center); }
void CAccessoryManager::PartsFrontDraw() { const Float2 BackPos = Float2(50, 70); for (auto& it : parts) { if (it->GetState() == CParts::State::None) continue; if (std::dynamic_pointer_cast<CAccessory>(it)->GetZBuffer() != CAccessory::ZBuffer::Front) continue; TextureAsset(CResource::GetInstance().GetAccessory(it->GetId())).draw(BackPos); } }
void CPatrollerAnimation::Draw() { auto atk = task->GetComponent<CPlayerAttack>(CGameManager::Attack, 0); auto pos = (task->GetComponent<CScroll>(CGameManager::Scroll, 0)->transform.GetPos()); auto patroller = task->GetComponent<CPatroller>(CEnemyManager::Patroller, 0); auto patro_atk = task->GetComponent<CPatrollerAttack>(CEnemyManager::PatrollerAttack, 0); if (Collision::RectToRect(patroller->transform.GetPos() - pos, patroller->transform.GetScale(), atk->transform.GetPos(), atk->transform.GetScale()) && atk->isCollision) { Rect(patroller->transform.GetPos() - pos, patroller->transform.GetScale())(TextureAsset(L"Patroller")(TextureSize.x * MoveTexture.x, TextureSize.y * MoveTexture.y, TextureSize.x, TextureSize.y)).draw(ColorF(Palette::Yellow)); } else if (CharacterController::AttackKey()) { Rect(patro_atk->transform.GetPos(), patro_atk->transform.GetScale())(TextureAsset(L"Fire")(TextureSize.x * MoveTexture.x, TextureSize.y * MoveTexture.y, TextureSize.x, TextureSize.y)).draw(); Rect(patroller->transform.GetPos() - pos, patroller->transform.GetScale())(TextureAsset(L"Patroller")(TextureSize.x * MoveTexture.x, TextureSize.y * MoveTexture.y, TextureSize.x, TextureSize.y)).draw(); } else { Rect(patroller->transform.GetPos() - pos, patroller->transform.GetScale())(TextureAsset(L"Patroller")(TextureSize.x * MoveTexture.x, TextureSize.y * MoveTexture.y, TextureSize.x, TextureSize.y)).draw(); } }
void Player::PlayerDraw() { //右向き if (direction == 0) { TextureAsset(L"soldier").uv(0, 0.25, 0.25, 0.25).resize(32, 32).draw(x, y); /*if (timer % 240 == 0) TextureAsset(L"soldier").uv(0, 0.25, 0.25, 0.25).draw(x, y); if (timer % 240 == 60) TextureAsset(L"soldier").uv(0.25, 0.25, 0.25, 0.25).draw(x, y); if (timer % 240 == 120) TextureAsset(L"soldier").uv(0.50, 0.25, 0.25, 0.25).draw(x, y); if (timer % 240 == 180) TextureAsset(L"soldier").uv(0.75, 0.25, 0.25, 0.25).draw(x, y);*/ } //左向き if (direction == 1) { TextureAsset(L"soldier").uv(0, 0.50, 0.25, 0.25).resize(32, 32).draw(x, y); /*if (timer % 240 == 0) TextureAsset(L"soldier").uv(0, 0.50, 0.25, 0.25).draw(x, y); if (timer % 240 == 60) TextureAsset(L"soldier").uv(0.25, 0.50, 0.25, 0.25).draw(x, y); if (timer % 240 == 120) TextureAsset(L"soldier").uv(0.50, 0.50, 0.25, 0.25).draw(x, y); if (timer % 240 == 180) TextureAsset(L"soldier").uv(0.75, 0.50, 0.25, 0.25).draw(x, y);*/ } //上向き if (direction == 2) { TextureAsset(L"soldier").uv(0, 0.75, 0.25, 0.25).resize(32, 32).draw(x, y); /*if (timer % 240 == 0) TextureAsset(L"soldier").uv(0, 0.75, 0.25, 0.25).draw(x, y); if (timer % 240 == 60) TextureAsset(L"soldier").uv(0.25, 0.75, 0.25, 0.25).draw(x, y); if (timer % 240 == 120) TextureAsset(L"soldier").uv(0.50, 0.75, 0.25, 0.25).draw(x, y); if (timer % 240 == 180) TextureAsset(L"soldier").uv(0.75, 0.75, 0.25, 0.25).draw(x, y);*/ } //下向き if (direction == 3) { TextureAsset(L"soldier").uv(0, 0, 0.25, 0.25).resize(32,32).draw(x, y); /*if (timer % 240 == 0) TextureAsset(L"soldier").uv(0, 0, 0.25, 0.25).draw(x, y); if (timer % 240 == 60) TextureAsset(L"soldier").uv(0.25, 0, 0.25, 0.25).draw(x, y); if (timer % 240 == 120) TextureAsset(L"soldier").uv(0.50, 0, 0.25, 0.25).draw(x, y); if (timer % 240 == 180) TextureAsset(L"soldier").uv(0.75, 0, 0.25, 0.25).draw(x, y);*/ } }
void CMisc::drawModel(Model model, Vec3 pos, Vec3 rot) { for (const auto& node : model.nodes()) { if (node.material.diffuseTextureName.isEmpty) { node.mesh.translated(pos).draw(); } else { node.mesh.translated(pos).rotated(rot).draw(TextureAsset(node.material.diffuseTextureName)); } } }
void Main() { TextureAsset::Register(L"noise", L"Texture/noise.png"); //設定の読み込み LoadConfig(); //タイトル String Title(L"高専の敷き詰め理論ⅠB"); Point TitlePos(10, 0); //ウィンドウスタイルの設定 Window::SetStyle(WindowStyle::NonFrame); Window::Resize(960, 540); //フォントの用意 Font titlefont(30); Texture Back(L"Texture/BlackBord.png"); Rect font_size = titlefont.region(Title); //ボタンの用意 Button Download(download, 20, 100, L"・ダウンロード"); Button SelectFile(selectfile, 20, 170, L"・ファイルを選択"); Button ReAnswer(reanswer, 20, 240, L"・再度問題を解く"); Button Upload(upload, 20, 350, L"・アップロード"); //バグ除け Gout << L"準備完了\n"; while (System::Update()){ //ボタンのアップデート if (Download.end && SelectFile.end && Upload.end && ReAnswer.end){ Download.Update(); SelectFile.Update(); Upload.Update(); ReAnswer.Update(); } //描画 Back.draw(); titlefont(Title).draw(TitlePos, Palette::White); TextureAsset(L"noise").map(font_size.w, font_size.h).draw(TitlePos); Download.Draw(); SelectFile.Draw(); ReAnswer.Draw(); Upload.Draw(); Gout.Draw(); DD.Draw(); } }
void StaffRollContent::draw()const { if (state_m == L"firstTitle"){ FontAsset(titleEnglishFontHandle)(L"G a r b a g e C o l l e c t i o n").drawCenter(Window::Center(), Palette::Whitesmoke); FontAsset(titleJapaneseFontHandle)(L"〜 ガ ベ こ れ 〜").drawCenter(Window::Center().movedBy(0,FontAsset(titleJapaneseFontHandle).size+40), Palette::Whitesmoke); } else if (state_m == L"circleLogo"){ TextureAsset(circleLogoHandle).scale(0.8).drawAt(Window::Center()); } else if (state_m == L"titleLogo"){ DespiteOfScene::sendDrawingInstruction(); } else if (state_m == L"finalize"){ } else{ memory_m.draw(); memoryR_m->draw(); } }
void Shot::draw() { TextureAsset(L"shot").drawAt(pos); }
void CFloor::Draw() { auto pos = (task->GetComponent<CScroll>(CGameManager::Scroll, 0)->transform.GetPos()); Rect(transform.GetPos() - pos, transform.GetScale())(TextureAsset(L"Floor")).draw(); }
void CAccessory::PartsDraw() { TextureAsset(CResource::GetInstance().GetAccessory(id)).resize(size).draw(pos + parts_pos); }
void CMenuManager::Draw() { //Logo->drawCenter(L"メニュー", Float2(CGameApplication::ScreenWidth / 2, 100), Palette::Royalblue); TextureAsset(L"OP")/*.resize(CGameApplication::ScreenWidth, CGameApplication::ScreenHeight)*/.draw(); TextureAsset(L"ゲーム説明")/*.resize(CGameApplication::ScreenWidth, CGameApplication::ScreenHeight)*/.draw(CGameApplication::ScreenWidth / 2 - 313, 250); }
void CNose::PartsDraw() { TextureAsset(CResource::GetInstance().GetNose(id)).resize(size * 2).draw(pos + parts_pos); }
void CSet::PartsDraw() { TextureAsset(CResource::GetInstance().GetSet(id)).resize(size).draw(pos + parts_pos); }
void DrawableAssetTexture::draw() const { TextureAsset(name_m).scale(scale_m).drawAt(center_m); }