#include <gSensor.h>
Public Member Functions | |
gSensor (eGameObject *o, const eCoord &start, const eCoord &d) | |
virtual void | PassEdge (const eWall *w, REAL time, REAL, int=1) |
Public Attributes | |
gSensorWallType | type |
Definition at line 39 of file gSensor.h.
gSensor::gSensor | ( | eGameObject * | o, | |
const eCoord & | start, | |||
const eCoord & | d | |||
) | [inline] |
Reimplemented from eSensor.
Reimplemented in gCycleChatBot::Sensor.
Definition at line 35 of file gSensor.cpp.
References gPlayerWall::BegTime(), gPlayerWall::Cycle(), gPlayerWall::EndTime(), gSENSOR_ENEMY, gSENSOR_RIM, gSENSOR_SELF, gSENSOR_TEAMMATE, gCycle::IsMe(), eSensor::lr, eSensor::PassEdge(), eGameObject::Team(), and type.
Referenced by gCycleChatBot::Sensor::PassEdge().
00035 { 00036 if (!ww) 00037 return; 00038 00039 try{ 00040 eSensor::PassEdge(ww,time,a,r); 00041 } 00042 catch( eSensorFinished & e ) 00043 { 00044 const gPlayerWall *w=dynamic_cast<const gPlayerWall*>(ww); 00045 if (w) 00046 { 00047 gCycle *owner=w->Cycle(); 00048 if (owner && owner->IsMe( owned ) ) 00049 { 00050 type=gSENSOR_SELF; 00051 } 00052 else if ( owner && owned && owner->Team() == owned->Team() ) 00053 { 00054 type=gSENSOR_TEAMMATE; 00055 } 00056 else 00057 { 00058 type=gSENSOR_ENEMY; 00059 } 00060 00061 if (w->EndTime() < w->BegTime()) 00062 lr=-lr; 00063 } 00064 else if (dynamic_cast<const gWallRim*>(ww)) 00065 type=gSENSOR_RIM; 00066 00067 throw; 00068 } 00069 }
Definition at line 41 of file gSensor.h.
Referenced by gHitData::AddHit(), blocks(), gCycleMovement::CalculateAcceleration(), gCycleChatBot::Distance(), gCycleMovement::DoTurn(), gCycleChatBot::FindHugReplacement(), and PassEdge().