Advanced Strategic Command
Public Member Functions | Protected Member Functions | List of all members
AnyUnitEntersPolygon Class Reference

#include <gameevents.h>

Inheritance diagram for AnyUnitEntersPolygon:
Inheritance graph
[legend]

Public Member Functions

 AnyUnitEntersPolygon (int player_=0)
 
virtual void readData (tnstream &stream)
 
virtual void writeData (tnstream &stream)
 
void setup ()
 
void arm ()
 
void triggered (const Context &context)
 
ASCString getTypeName () const
 
ASCString getDetailledName () const
 
- Public Member Functions inherited from EventTrigger
State state (int player)
 takes the inversion into account, which getState(int) does not More...
 
void setMap (GameMap *gamemap_)
 
void setEvent (Event *ev)
 
EventTriggerID getTriggerID ()
 
virtual ~EventTrigger ()
 
- Public Member Functions inherited from FieldAddressing
void setField (const MapCoordinate &pos)
 
void setPolygon (const Poly_gon &poly_gon)
 
void setGlobal ()
 
virtual ~FieldAddressing ()
 

Protected Member Functions

virtual State getState (int player)
 
void fieldOperator (const MapCoordinate &mc)
 
- Protected Member Functions inherited from EventTrigger
 EventTrigger (EventTriggerID id)
 
bool isFulfilled ()
 
- Protected Member Functions inherited from FieldAddressing
 FieldAddressing (GameMap *&gamemap)
 
void readMapModificationData (tnstream &stream)
 
void writeMapModificationData (tnstream &stream)
 
void operate ()
 
void setpointabs (int x, int y)
 
void setup ()
 
- Protected Member Functions inherited from PolygonPainterSquareCoordinate
virtual void setpoint (int x, int y)
 
void setspecificpoint (int x, int y)
 
bool paintPolygon (const Poly_gon &poly)
 
- Protected Member Functions inherited from PolygonPainter< Poly_gon >
virtual void sortpolygon (Poly_gon &a)
 
virtual void painttriangle (typename Poly_gon::Point p[])
 
virtual void painthorizline (int x1, int x2, int y)
 
virtual void paintline (int x1, int y1, int x2, int y2)
 
virtual int getpolydir (const Poly_gon &a)
 
virtual double getsegmentdir (int dx, int dy)
 
virtual bool checkpolygon (const Poly_gon &poly)
 returns true if polygon correct More...
 
virtual bool checkline (typename Poly_gon::Point a, typename Poly_gon::Point b, typename Poly_gon::Point d, typename Poly_gon::Point e)
 returns true if lines a-b and c-d don't intersect More...
 
virtual ~PolygonPainter ()
 
bool paintPolygon (const Poly_gon &poly)
 

Additional Inherited Members

- Public Types inherited from EventTrigger
enum  State { unfulfilled, fulfilled, finally_fulfilled, finally_failed }
 
- Public Types inherited from FieldAddressing
typedef vector< MapCoordinateFields
 
typedef vector< Poly_gonPolygons
 
- Public Attributes inherited from EventTrigger
bool invert
 
- Protected Types inherited from FieldAddressing
enum  AddressingMode { none, singleField, poly, global }
 
- Protected Attributes inherited from EventTrigger
GameMapgamemap
 
Eventevent
 
- Protected Attributes inherited from FieldAddressing
AddressingMode addressingMode
 
Fields fields
 
Polygons polygons
 

Detailed Description

Definition at line 375 of file gameevents.h.

Constructor & Destructor Documentation

AnyUnitEntersPolygon::AnyUnitEntersPolygon ( int  player_ = 0)
inline

Definition at line 382 of file gameevents.h.

Member Function Documentation

void AnyUnitEntersPolygon::arm ( )
virtual

Reimplemented from EventTrigger.

Definition at line 782 of file gameevents.cpp.

References fieldCrossed, FieldAddressing::operate(), and triggered().

void AnyUnitEntersPolygon::fieldOperator ( const MapCoordinate mc)
protectedvirtual
ASCString AnyUnitEntersPolygon::getDetailledName ( ) const
virtual

Implements EventTrigger.

Definition at line 761 of file gameevents.cpp.

References EventTrigger::gamemap, Player::getName(), and GameMap::player.

EventTrigger::State AnyUnitEntersPolygon::getState ( int  player)
protectedvirtual
ASCString AnyUnitEntersPolygon::getTypeName ( ) const
virtual

Implements EventTrigger.

Definition at line 756 of file gameevents.cpp.

void AnyUnitEntersPolygon::readData ( tnstream stream)
virtual
void AnyUnitEntersPolygon::setup ( void  )
virtual

Implements EventTrigger.

Definition at line 776 of file gameevents.cpp.

References playerselall(), and FieldAddressing::setup().

void AnyUnitEntersPolygon::triggered ( const Context context)

Definition at line 792 of file gameevents.cpp.

References eventReady(), EventTrigger::gamemap, and EventTrigger::isFulfilled().

Referenced by arm().

void AnyUnitEntersPolygon::writeData ( tnstream stream)
virtual

Implements EventTrigger.

Definition at line 749 of file gameevents.cpp.

References tnstream::writeInt(), and FieldAddressing::writeMapModificationData().


The documentation for this class was generated from the following files: