Tiberian Technologies Scripts Reference Revision: 9000
Loading...
Searching...
No Matches
ObserverImpClass.h
1/* Renegade Scripts.dll
2 Copyright 2013 Tiberian Technologies
3 This file is part of the Renegade scripts.dll
4 The Renegade scripts.dll is free software; you can redistribute it and/or modify it under
5 the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 2, or (at your option) any later
7 version. See the file COPYING for more details.
8 In addition, an exemption is given to allow Run Time Dynamic Linking of this code with any closed source module that does not contain code covered by this licence.
9 Only the source code to the module(s) containing the licenced code has to be released.
10*/
11#pragma once
12
23class ObserverImpClass : public GameObjObserverClass
24{
25public:
26 ObserverImpClass(StringClass name) { m_name = name; }
27 virtual const char* Get_Name() { return m_name.Peek_Buffer(); }
28
29protected:
30 // Provide dummy implementations of all GameObjObserverClass abstracts such that derived classes
31 // are not forced to provide their own stubs (that's basically the whole point of this class)
32 virtual void Attach(GameObject* obj) {};
33 virtual void Detach(GameObject* obj) {};
34 virtual void Animation_Complete(GameObject *obj, const char *animation_name) {};
35 virtual void Created(GameObject* obj) {};
36 virtual void Destroyed(GameObject* obj) {};
37 virtual void Killed(GameObject* obj,GameObject* pKiller) {};
38 virtual void Damaged(GameObject* obj,GameObject* pDamager,float amount) {};
39 virtual void Custom(GameObject* obj,int type,int param,GameObject* pSender) {};
40 virtual void Sound_Heard(GameObject* obj,const CombatSound & sound) {};
41 virtual void Enemy_Seen(GameObject* obj,GameObject* pEnemy) {};
42 virtual void Action_Complete(GameObject* obj,int action_id,ActionCompleteReason complete_reason) {};
43 virtual void Timer_Expired(GameObject* obj,int number) {};
44 virtual void Poked(GameObject* obj,GameObject* pPoker) {};
45 virtual void Entered(GameObject* obj, GameObject* pEnterer) {};
46 virtual void Exited(GameObject* obj, GameObject* pExiter) {};
47
48private:
49 StringClass m_name;
50};
GameObject Observer Base Class.
Definition ObserverImpClass.h:24