Repository navigation
Expand file tree
/
Copy pathHarambe.cpp
More file actions
36 lines (33 loc) · 1.52 KB
/
Copy pathHarambe.cpp
File metadata and controls
36 lines (33 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//
// Created by Nitish Katta on 12/15/16.
//
#include "Harambe.h"
Harambe::Harambe(float spriteInterval, PlayerType playerType) {
// Call to superclass constructor
AnimatedGameObject(spriteInterval, playerType);
this->load("harambe64.png");
this->useAnimations(GameObject::Direction::up);
this->addTextureRect(sf::Rect<int>(0, 0, 120, 134));
this->useAnimations(GameObject::Direction::down);
this->addTextureRect(sf::Rect<int>(0, 0, 120, 134));
this->useAnimations(GameObject::Direction::left);
this->addTextureRect(sf::Rect<int>(0, 0, 120, 134));
this->useAnimations(GameObject::Direction::right);
this->addTextureRect(sf::Rect<int>(0, 0, 120, 134));
this->useAnimations(GameObject::Direction::punch);
this->addTextureRect(sf::Rect<int>(0, 0, 120, 134));
this->useAnimations(GameObject::Direction::crouchPunch);
this->addTextureRect(sf::Rect<int>(0, 0, 120, 134));
this->useAnimations(GameObject::Direction::block);
this->addTextureRect(sf::Rect<int>(0, 0, 120, 134));
this->useAnimations(GameObject::Direction::crouchBlock);
this->addTextureRect(sf::Rect<int>(0, 0, 120, 134));
this->useAnimations(GameObject::Direction::kick);
this->addTextureRect(sf::Rect<int>(0, 0, 120, 134));
this->useAnimations(GameObject::Direction::crouchKick);
this->addTextureRect(sf::Rect<int>(0, 0, 120, 134));
this->useAnimations(GameObject::Direction::none);
this->addTextureRect(sf::Rect<int>(0, 0, 120, 134));
this->setScale(0.8f);
this->setPosition(560, 230);
}