SBSPSS/source/triggers/trigger.h

63 lines
1.2 KiB
C
Raw Normal View History

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-05-30 22:24:02 +02:00
TRIGGER_GARYSTART,
2001-05-30 18:52:52 +02:00
// Code based triggers
TRIGGER_PLATFORM,
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