示例#1
0
void Missile::RecvObject(RakNet::BitStream* bs, MyMsgIDs type)
{
	char _deleted;

	switch (type)
	{
		case ID_UPDATEMISSILE:
		{
			bs->Read(_deleted);
			// So were we deleted this time?
			if (_deleted == 1)
			{
				deleted = 1;
			}
			else
			{
				// Since we weren't deleted, let's update ourselvs
				float x, y, w;
				bs->Read(x);
				bs->Read(y);
				bs->Read(w);
				UpdateLoc(x, y, w);
				bs->Read(x);
				SetVelocityX(x);
				bs->Read(y);
				SetVelocityY(y);
			}
			break;
		}
	}
}
示例#2
0
void InstanceDlg::OnInitDialog(wxInitDialogEvent& event)
{
	GetChoiceFile()->Clear();
	for (uint i = 0; i < m_contents.size(); i++)
	{
		vtContentManager *mng = m_contents[i];
		vtString str = mng->GetFilename();
		wxString ws(str, wxConvUTF8);
		GetChoiceFile()->Append(ws);
	}
	GetChoiceFile()->Select(0);

	GetChoiceType()->Clear();
	GetChoiceType()->Append(_("(All)"));
	GetChoiceType()->Select(0);

	UpdateLoc();
	UpdateEnabling();
	UpdateContentItems();

	wxDialog::OnInitDialog(event);
}
示例#3
0
void InstanceDlg::SetLocation(const DPoint2 &pos)
{
	m_pos = pos;
	UpdateLoc();
}