Beispiel #1
0
void Player::Respawn()
{
	if (IsDead() == false)
	{
		return;
	}

	m_position = m_respawnPosition;
	
	// Make sure we create a chunk in the respawn position
	UpdateGridPosition();
	m_pChunkManager->CreateNewChunk(GetGridX(), GetGridY(), GetGridZ());

	m_health = m_maxHealth;

	VoxGame::GetInstance()->GetHUD()->UpdatePlayerData();

	// Also go through all the equipped items and equip them
	for (int i = 0; i < EquipSlot_NumSlots; i++)
	{
		InventoryItem* pItem = m_pInventoryManager->GetInventoryItemForEquipSlot((EquipSlot)i);
		if (pItem != NULL)
		{
			EquipItem(pItem, true);
		}
	}

	m_dead = false;
}
void Window_DollListBase::DrawDollFocus(int _column, int _row, bool _outFocus) const{
	if(_column < 0 || _row < 0) return;
	pSkin->DrawFocusRectForDollIcon(
		frameArea.x + contentArea.x + GetGridX(_column), 
		frameArea.y + contentArea.y + GetGridY(_row),
		activeCount, _outFocus);
}
Beispiel #3
0
std::vector<int> SceneImporter::GetGridDims(){
	std::vector<int> m_grid_dims(3);
	m_grid_dims[0] = GetGridX();
	m_grid_dims[1] = GetGridY();
	m_grid_dims[2] = GetGridZ();

	return m_grid_dims;
}
void Window_DollListBase::DrawDollIcon(int _column, int _row, BYTE _drawPtn) const{
	Game_CampDoll* pDoll = NULL;
	BYTE gaugeType = CAMPDOLL_GAUGE_TYPE_NONE;
	switch(_drawPtn){
	case DOLLLIST_DRAWPTN_HPBAR:
		gaugeType = CAMPDOLL_GAUGE_TYPE_HP;
		break;
	case DOLLLIST_DRAWPTN_TPBAR:
		gaugeType = CAMPDOLL_GAUGE_TYPE_TP;
		break;
	case DOLLLIST_DRAWPTN_HP_AND_TPBAR:
		gaugeType = CAMPDOLL_GAUGE_TYPE_HP_AND_TP;
		break;
	}
	int index = GetDollIndex(_column, _row);
	pDoll = GetDollPtrNC(index);
	if(pDoll != NULL){
		pDoll->DrawAsIcon(
			frameArea.x + contentArea.x + GetGridX(_column),
			frameArea.y + contentArea.y + GetGridY(_row), 
			GetPresetColor(presetColorIndex, COLORSET_COLOR_NORMAL), 
			gaugeType);
	}
}