5 * Created by Alyssa Milburn on Tue May 25 2004.
6 * Copyright (c) 2004 Alyssa Milburn. All rights reserved.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
23 #include "CompoundAgent.h"
26 class Vehicle
: public CompoundAgent
{
28 friend class SFCVehicle
;
30 unsigned int capacity
;
34 Vehicle(unsigned int family
, unsigned int genus
, unsigned int species
, unsigned int plane
,
35 std::string spritefile
, unsigned int firstimage
, unsigned int imagecount
);
36 Vehicle(std::string spritefile
, unsigned int firstimage
, unsigned int imagecount
); // C1/C2 constructor
39 int cabinleft
, cabintop
, cabinright
, cabinbottom
; // TODO: should be protected w/accessors?
42 void setCabinRect(int l
, int t
, int r
, int b
) { cabinleft
= l
; cabintop
= t
; cabinright
= r
; cabinbottom
= b
; }
43 void setCapacity(unsigned int c
) { capacity
= c
; }
44 unsigned int getBump() { return bump
; }
46 std::vector
<AgentRef
> passengers
;
48 virtual void carry(AgentRef
);
49 virtual void drop(AgentRef
);
50 virtual void adjustCarried(float xoffset
, float yoffset
);