⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 npc_odell.h

📁 hl2 source code. Do not use it illegal.
💻 H
字号:
//========= Copyright (c) 1996-2002, Valve LLC, All rights reserved. ==========
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================

#ifndef	NPC_ODELL_H
#define	NPC_ODELL_H

#include "ai_baseactor.h"
#include "ai_behavior.h"
#include "ai_behavior_lead.h"
#include "ai_behavior_follow.h"

class CNPC_Odell;


//-----------------------------------------------------------------------------

#if 0
#define CONCEPT_LEAD_LOST_FOLLOWER		"OD_LOSTYOU"
#define CONCEPT_LEAD_FOUND_FOLLOWER		"OD_FIND"
#define CONCEPT_LEAD_SEEKING_FOLLOWER	"OD_SEEK"
#endif

//-----------------------------------------------------------------------------

class CNPC_OdellExpresser : public CAI_Expresser
{
public:
	CNPC_OdellExpresser()
	{
	}
	
	virtual bool Speak( AIConcept_t concept, const char *pszModifiers = NULL );
	
private:
};

//-----------------------------------------------------------------------------
// CNPC_Odell
//
//-----------------------------------------------------------------------------


class CNPC_Odell : public CAI_BaseActor
{
	DECLARE_CLASS( CNPC_Odell, CAI_BaseActor );

public:
	CNPC_Odell();

	bool CreateBehaviors();
	void Spawn( void );
	void Precache( void );

	Class_T		Classify( void );
	float		MaxYawSpeed( void );
	int			ObjectCaps( void ) { return UsableNPCObjectCaps( BaseClass::ObjectCaps() ); }
	int			TranslateSchedule( int scheduleType );
	int			SelectSchedule ( void );
	bool 		OnBehaviorChangeStatus(  CAI_BehaviorBase *pBehavior, bool fCanFinishSchedule );

	void        HandleAnimEvent( animevent_t *pEvent );

	bool		IsLeading( void ) { return ( GetRunningBehavior() == &m_LeadBehavior && m_LeadBehavior.HasGoal() ); }
	bool		IsFollowing( void ) { return ( GetRunningBehavior() == &m_FollowBehavior && m_FollowBehavior.GetFollowTarget() ); }

private:

	// --------------------------------
	//
	// Talking
	//
	virtual CAI_Expresser *CreateExpresser() { return new CNPC_OdellExpresser; }

	// --------------------------------
	
	DEFINE_CUSTOM_AI;

	// --------------------------------
	//
	// Lead
	//
	CAI_LeadBehavior m_LeadBehavior;

	// --------------------------------
	//
	// Follow
	//
	CAI_FollowBehavior m_FollowBehavior;
	

};

//-----------------------------------------------------------------------------

#endif	//NPC_ODELL_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -