Example #1
0
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();
	}
}
Example #2
0
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 });
}
Example #3
0
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);

}
Example #4
0
	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);
		}
	}
Example #5
0
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);

}
Example #6
0
void CDownStairs::Start()
{
	if (!TextureAsset(L"DownStairs"))
	{
		TextureAsset::Register(L"DownStairs", L"engine/data/texture/MapChip/map_stair_down.png");
	}
}
Example #7
0
void CFloor::Start()
{
	if (!TextureAsset(L"Floor"))
	{
		TextureAsset::Register(L"Floor", L"engine/data/texture/MapChip/map_ground_batu_c.png");
	}
}
Example #8
0
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);
}
Example #9
0
void CTopsManager::PartsDraw()
{
	const Float2 BackPos = Float2(50, 70);
	if (select_id <= -1) return;
	TextureAsset(CResource::GetInstance().GetTops(select_id)).draw(BackPos);

}
Example #10
0
void CGroupManager::PartsDraw()
{
	const Float2 BackPos = Float2(350, 150);
	if (select_id <= -1) return;
	TextureAsset(CResource::GetInstance().GetGroup(select_id)).draw(BackPos);

}
Example #11
0
void CAvatarManager::Draw()
{
    TextureAsset(CResource::GetInstance().GetGraphic(CResource::GraphicType::BackGraphic)).draw(0,0);

    task->Draw();
    task->Remove();

}
Example #12
0
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();
	}
}
Example #15
0
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);*/
	}
}
Example #16
0
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));
		}
	}
}
Example #17
0
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();
	}
}
Example #18
0
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();
	}
}
Example #19
0
void Shot::draw() {
	TextureAsset(L"shot").drawAt(pos);
}
Example #20
0
void CFloor::Draw()
{
	auto pos = (task->GetComponent<CScroll>(CGameManager::Scroll, 0)->transform.GetPos());

	Rect(transform.GetPos() - pos, transform.GetScale())(TextureAsset(L"Floor")).draw();
}
Example #21
0
void CAccessory::PartsDraw()
{
	TextureAsset(CResource::GetInstance().GetAccessory(id)).resize(size).draw(pos + parts_pos);
}
Example #22
0
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);
}
Example #23
0
void CNose::PartsDraw()
{
	TextureAsset(CResource::GetInstance().GetNose(id)).resize(size * 2).draw(pos + parts_pos);
}
Example #24
0
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);
}