2001-05-29 21:25:37 +02:00
|
|
|
/*=========================================================================
|
|
|
|
|
|
|
|
trigger.h
|
|
|
|
|
|
|
|
Author: dave
|
2001-05-29 22:31:02 +02:00
|
|
|
Created: cos paul was too lazy
|
2001-05-29 21:25:37 +02:00
|
|
|
Project: Spongebob
|
2001-05-29 22:31:02 +02:00
|
|
|
Purpose: Oh, cos I like the sound of my own typing
|
2001-05-29 21:25:37 +02:00
|
|
|
|
|
|
|
Copyright (c) 2001 Climax Development Ltd
|
|
|
|
|
|
|
|
===========================================================================*/
|
|
|
|
|
|
|
|
#ifndef __TRIGGER_TRIGGER_HEADER__
|
|
|
|
#define __TRIGGER_TRIGGER_HEADER__
|
|
|
|
|
|
|
|
#ifndef __THING_THING_H__
|
|
|
|
#include "thing/thing.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
class CTrigger : public CTriggerThing
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
enum TRIGGER_TYPE
|
|
|
|
{
|
|
|
|
TRIGGER_EXIT=0,
|
|
|
|
TRIGGER_RESPAWN,
|
|
|
|
TRIGGER_TELEPORT,
|
|
|
|
TRIGGER_CAMLOCK,
|
2001-05-29 22:31:02 +02:00
|
|
|
TRIGGER_INWATER,
|
|
|
|
TRIGGER_OUTWATER,
|
2001-06-05 16:38:11 +02:00
|
|
|
TRIGGER_GARY_START,
|
|
|
|
TRIGGER_FLAME_EMITTER,
|
|
|
|
TRIGGER_INTERMITTENT_FLAME_EMITTER,
|
|
|
|
TRIGGER_GARY_STOP,
|
|
|
|
TRIGGER_GARY_GO_LEFT,
|
|
|
|
TRIGGER_GARY_GO_RIGHT,
|
|
|
|
TRIGGER_BUBBLE_EMITTER,
|
|
|
|
TRIGGER_INTERMITTENT_LEFT_FLAME_EMITTER,
|
|
|
|
TRIGGER_INTERMITTENT_DOWN_FLAME_EMITTER,
|
|
|
|
TRIGGER_BUBBLE_GEYSER_EMITTER,
|
2001-06-05 22:21:11 +02:00
|
|
|
TRIGGER_STEAM_EMITTER,
|
2001-06-06 20:40:34 +02:00
|
|
|
TRIGGER_GARY_BOWL,
|
2001-05-30 18:52:52 +02:00
|
|
|
|
|
|
|
// Code based triggers
|
|
|
|
TRIGGER_PLATFORM,
|
2001-06-04 21:01:17 +02:00
|
|
|
TRIGGER_HAZARD,
|
2001-06-05 18:01:22 +02:00
|
|
|
TRIGGER_HAZARD_WALK,
|
2001-06-06 15:27:46 +02:00
|
|
|
TRIGGER_STEAM_SWITCH_EMITTER,
|
2001-05-29 21:25:37 +02:00
|
|
|
TRIGGER_MAX,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum
|
|
|
|
{ // For Dynamic ThingCache
|
|
|
|
MAX_SUBTYPE =TRIGGER_MAX,
|
|
|
|
};
|
|
|
|
|
|
|
|
virtual void init();
|
|
|
|
virtual void shutdown();
|
2001-05-29 22:31:02 +02:00
|
|
|
virtual void think(int _frames);
|
|
|
|
virtual void render();
|
2001-05-29 21:25:37 +02:00
|
|
|
|
|
|
|
static CTrigger *Create(int Type);
|
|
|
|
static CTrigger *Create(sThingTrigger *ThisTrigger);
|
2001-05-29 22:31:02 +02:00
|
|
|
virtual void setPositionAndSize(int _x,int _y,int _w,int _h);
|
|
|
|
virtual void setTargetBox(int _x,int _y,int _w,int _h);
|
2001-05-29 21:25:37 +02:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void collidedWith(CThing *_thisThing){};
|
|
|
|
|
2001-05-29 22:31:02 +02:00
|
|
|
int m_boxX1,m_boxY1,m_boxX2,m_boxY2;
|
|
|
|
|
2001-05-29 21:25:37 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|