Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Dungeon-Game/DamagePotion.cpp
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
13 lines (9 sloc)
637 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
////for this code and that of the general inventory, and sword I began by following along with this article:https://codereview.stackexchange.com/questions/194561/c-inventory-system but I simply used it as inspiration before designing this for this specific task as some of the features within that code weren't useful to this scenario within our game, also the sword.cpp and sword.h are clones of this file, however with different characteristics so the same reference applies | |
#include "DamagePotion.h" | |
DamagePotion::DamagePotion(int damage) : m_dmg(damage) | |
{ | |
} | |
void DamagePotion::use(temp::GameObject* hit) | |
{ | |
hit::damage(m_dmg); | |
} |