您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetY函数代码示例

51自学网 2021-06-01 21:18:24
  C++
这篇教程C++ GetY函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中GetY函数的典型用法代码示例。如果您正苦于以下问题:C++ GetY函数的具体用法?C++ GetY怎么用?C++ GetY使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了GetY函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: FxHomeCallTimer

func FxHomeCallTimer(object target, proplist fx, int time){	if(!master)	{		KillBall();		return -1;	}			if(GetEffect("Blocked", this))	{		ox=GetX();		oy=GetY();		return;	}		DrawParticleLine("Flash", 0, 0, ox-GetX(), oy-GetY(), 1, 0, 0, 15, hometrailparticles);		if(time%7 == 0)	{		for(var i = 0; i < 360; i+=5)		{			CreateParticle("Flash", Sin(i, 3), -Cos(i, 5), 0, 0, 10, hometrailparticles2, 2);		}	}	fx.x = master->GetX();	fx.y = master->GetY();	var angle = Angle(GetX(), GetY(), fx.x, fx.y, 10);	var txdir = Sin(angle, Speed + 12, 10);	var tydir = -Cos(angle, Speed + 12, 10);	SetXDir((GetXDir() + (txdir - GetXDir())/2));	SetYDir((GetYDir() + (tydir - GetYDir())/2));		CheckForEnemies(HomeCallSize);		ox=GetX();	oy=GetY();		var dst = Distance(GetX(), GetY(), fx.x, fx.y);	if(dst < 8)	{		AddShield(master);		Sound("Ball::ball_shield", false, 20);				var particles =		{			Prototype = Particles_Glimmer(),			R = pR,			G = pG,			B = pB,			Alpha = 255,			Size = PV_Linear(10, 0),			OnCollision = PC_Bounce(),		};		CreateParticle("StarSpark", 0, 0, PV_Random(-60,60), PV_Random(-60, 60), 25, particles, 5);				var particle =		{			Alpha = PV_Linear(255, 0),			Size = 50,			R = pR,			G = pG,			B = pB,			BlitMode = GFX_BLIT_Additive,		};		master->CreateParticle("StarSpark", 0, 0, 0, 0, 7, particle, 4);				FollowMaster();		return -1;	}}
开发者ID:TheThow,项目名称:OpenClonk-Stuff,代码行数:71,


示例2: GetRight

Line Rectangle::GetRight() const {    auto p = this->_transform.GetPosition();    auto e = this->_half_extents;    return {{p.GetX() + e.GetX(), p.GetY() - e.GetY()}, {p.GetX() + e.GetX(), p.GetY() + e.GetY()}};}
开发者ID:cugone,项目名称:Abrams2015,代码行数:5,


示例3: GetBottomRight

Vector2D Rectangle::GetBottomRight() const {    auto p = this->_transform.GetPosition();    auto e = this->_half_extents;    return {p.GetX() + e.GetX(), p.GetY() + e.GetY()};}
开发者ID:cugone,项目名称:Abrams2015,代码行数:5,


示例4: wxLogInfo

void BackgroundDrawer::DrawYAxisVals(wxDC *dc, int tick_len, int line_width) {	double min = m_draw->GetDrawInfo()->GetMin();	double max = m_draw->GetDrawInfo()->GetMax();	double dif = max - min;	if (dif <= 0) {		wxLogInfo(_T("%s %f %f"), m_draw->GetDrawInfo()->GetName().c_str(), min, max);		assert(false);	}	//procedure for calculating distance between marks stolen from SzarpDraw2	double x = dif;	double step;	int i = 0;	if (x < 1)		for (;x < 1; x *=10, --i);	else		for (;(int)x / 10; x /=10, ++i);	if (x <= 1.5)		step = .1;	else if (x <= 3.)		step = .2;	else if (x <= 7.5)		step = .5;	else		step = 1.;	double acc = 1;	int prec = m_draw->GetDrawInfo()->GetPrec();					for (int p = prec; p > 0; --p)		acc /= 10;	double factor  = (i > 0) ? 10 : .1;	for (;i; i -= i / abs(i))		step *= factor;	if (step < acc)		step = acc;    	dc->SetPen(wxPen(GetTimeAxisCol(), line_width, wxSOLID));	int w, h;	GetSize(&w, &h);	h -= m_bottommargin + m_topmargin;	for (double val = max; (min - val) < acc; val -= step) {	//for (double val = min; (val - max) < acc; val += step) {		int y = GetY(val);		dc->DrawLine(m_leftmargin - tick_len, y, m_leftmargin, y);		wxString sval = m_draw->GetDrawInfo()->GetValueStr(val, _T("- -"));		int textw, texth;		dc->GetTextExtent(sval, &textw, &texth);		dc->DrawText(sval, m_leftmargin - textw - 1, y + line_width / 2 + 1 );	}	dc->SetPen(wxNullPen);}
开发者ID:cyclefusion,项目名称:szarp,代码行数:68,


示例5: SetPosition

void Triangle::SetX(double x) {    SetPosition(x, GetY());}
开发者ID:cugone,项目名称:Abrams2010,代码行数:3,


示例6: return

bool Game_Character::IsInPosition(int x, int y) const {	return ((GetX() == x) && (GetY() == y));}
开发者ID:KitoHo,项目名称:Player,代码行数:3,


示例7: DrawBaseBuilding

void nobHarborBuilding::Draw(int x, int y){    // Geb
C++ GetZ函数代码示例
C++ GetXid函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。