HOG2
HumanUnit.cpp
Go to the documentation of this file.
1 /*
2  * $Id: humanUnit.cpp
3  * hog2
4  *
5  * Created by Nathan Sturtevant on 10/4/04.
6  * Modified by Nathan Sturtevant on 02/29/20.
7  *
8  * This file is part of HOG2. See https://github.com/nathansttt/hog2 for licensing information.
9  *
10  */
11 
12 #include "HumanUnit.h"
13 
14 humanUnit::humanUnit(int _x, int _y, unit *_target)
15 :unit(_x, _y, _target)
16 {
17  unitType = kWorldObject;
18  r = 0.0; g = 0.0; b = 1.0;
19 }
20 
22 {
23  b = 1-b;
24  tDirection res = nextDir;
25  // uncomment this line if you don't want units to keep moving
26  //nextDir = kStay;
27  return (tDirection)res;
28 }
SimulationInfo
Definition: SimulationInfo.h:13
MapProvider
Definition: MapProvider.h:23
humanUnit::nextDir
tDirection nextDir
Definition: HumanUnit.h:25
humanUnit::humanUnit
humanUnit(int x, int y, unit *target)
Definition: HumanUnit.cpp:14
humanUnit::makeMove
tDirection makeMove(MapProvider *mp, reservationProvider *rp, SimulationInfo *simInfo)
Definition: HumanUnit.cpp:21
tDirection
tDirection
Definition: Map2DEnvironment.h:77
reservationProvider
Definition: ReservationProvider.h:33
HumanUnit.h