• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ CapabilitiesAdd函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中CapabilitiesAdd函数的典型用法代码示例。如果您正苦于以下问题:C++ CapabilitiesAdd函数的具体用法?C++ CapabilitiesAdd怎么用?C++ CapabilitiesAdd使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了CapabilitiesAdd函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: Precache

//-----------------------------------------------------------------------------
// Purpose: 
//
//
//-----------------------------------------------------------------------------
void CGoat::Spawn( void )
{
	Precache();

	SetModel( GOAT_MODEL );
	SetHullType(HULL_MEDIUM);
	SetHullSizeNormal();

	SetSolid( SOLID_BBOX );
	AddSolidFlags( FSOLID_NOT_STANDABLE );
	SetMoveType( MOVETYPE_STEP );
	SetBloodColor( BLOOD_COLOR_RED );
	m_iHealth				= sk_goat_health.GetFloat();
//	m_iMaxHealth			= m_iHealth;
	m_flFieldOfView	= 0.5; // indicates the width of this NPC's forward view cone ( as a dotproduct result )
	m_NPCState	= NPC_STATE_NONE;

	CapabilitiesClear();

	CapabilitiesAdd( bits_CAP_TURN_HEAD | bits_CAP_MOVE_GROUND );
	// innate Range attack ( howling / shaking)	
	CapabilitiesAdd( bits_CAP_INNATE_RANGE_ATTACK1 | bits_CAP_INNATE_RANGE_ATTACK2 );
	
	// innate Melee attack ( charge+head attack / bite attack (from fish bite or byte missed with event )	
	CapabilitiesAdd( bits_CAP_INNATE_MELEE_ATTACK1 | bits_CAP_INNATE_MELEE_ATTACK2 );
	
	BaseClass::Spawn();
}
开发者ID:fuzzzzzz,项目名称:jurassic-life,代码行数:33,代码来源:npc_goat.cpp


示例2: Precache

//=========================================================
// Spawn
//=========================================================
void CNPC_HL1Barney::Spawn()
{
	Precache( );

	SetModel( "models/hl1bar.mdl");

	SetRenderColor( 255, 255, 255, 255 );
	
	SetHullType(HULL_HUMAN);
	SetHullSizeNormal();

	SetSolid( SOLID_BBOX );
	AddSolidFlags( FSOLID_NOT_STANDABLE );
	SetMoveType( MOVETYPE_STEP );
	m_bloodColor		= BLOOD_COLOR_RED;
	m_iHealth			= sk_barneyhl1_health.GetFloat();
	SetViewOffset( Vector ( 0, 0, 100 ) );// position of the eyes relative to monster's origin.
	m_flFieldOfView		= VIEW_FIELD_WIDE; // NOTE: we need a wide field of view so npc will notice player and say hello
	m_NPCState			= NPC_STATE_NONE;

	SetBodygroup( 1, 0 );

	m_fGunDrawn			= false;

	CapabilitiesClear();
	CapabilitiesAdd( bits_CAP_MOVE_GROUND | bits_CAP_OPEN_DOORS | bits_CAP_AUTO_DOORS | bits_CAP_USE | bits_CAP_DOORS_GROUP);
	CapabilitiesAdd( bits_CAP_INNATE_RANGE_ATTACK1 | bits_CAP_TURN_HEAD | bits_CAP_ANIMATEDFACE );
	
	NPCInit();
	
	SetUse( &CNPC_HL1Barney::FollowerUse );
}
开发者ID:hitmen047,项目名称:TF2HLCoop,代码行数:35,代码来源:hl1_npc_barney.cpp


示例3: Precache

//=========================================================
// Spawn
//=========================================================
void CGenericActor::Spawn()
{
    Precache();

    SetModel( STRING( GetModelName() ) );

    /*
    	if ( FStrEq( STRING( GetModelName() ), "models/player.mdl" ) )
    		UTIL_SetSize(this, VEC_HUMAN_HULL_MIN, VEC_HUMAN_HULL_MAX);
    	else
    		UTIL_SetSize(this, VEC_HULL_MIN, VEC_HULL_MAX);
    */

    if ( FStrEq( STRING( GetModelName() ), "models/player.mdl" ) ||
            FStrEq( STRING( GetModelName() ), "models/holo.mdl" ) ||
            FStrEq( STRING( GetModelName() ), "models/blackout.mdl" ) )
    {
        UTIL_SetSize(this, VEC_HULL_MIN, VEC_HULL_MAX);
    }
    else
    {
        UTIL_SetSize(this, NAI_Hull::Mins(HULL_HUMAN), NAI_Hull::Maxs(HULL_HUMAN));
    }

    if ( !FStrEq( STRING( GetModelName() ), "models/blackout.mdl" ) )
    {
        SetSolid( SOLID_BBOX );
        AddSolidFlags( FSOLID_NOT_STANDABLE );
    }
    else
    {
        SetSolid( SOLID_NONE );
    }

    SetMoveType( MOVETYPE_STEP );
    SetBloodColor( BLOOD_COLOR_RED );
    m_iHealth			= 8;
    m_flFieldOfView		= 0.5;// indicates the width of this NPC's forward view cone ( as a dotproduct result )
    m_NPCState			= NPC_STATE_NONE;

    CapabilitiesAdd( bits_CAP_MOVE_GROUND | bits_CAP_OPEN_DOORS );

    // remove head turn if no eyes or forward attachment
    if (LookupAttachment( "eyes" ) > 0 && LookupAttachment( "forward" ) > 0)
    {
        CapabilitiesAdd(  bits_CAP_TURN_HEAD | bits_CAP_ANIMATEDFACE );
    }

    if (m_strHullName != NULL_STRING)
    {
        SetHullType( NAI_Hull::LookupId( STRING( m_strHullName ) ) );
    }
    else
    {
        SetHullType( HULL_HUMAN );
    }
    SetHullSizeNormal( );

    NPCInit();
}
开发者ID:KermitAudio,项目名称:MSS,代码行数:63,代码来源:genericactor.cpp


示例4: Precache

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
void CRebelZombie::Spawn( void )
{
	Precache();

	m_fIsHeadless = false;

	m_iRebelZombieSkin = random->RandomInt(1,4);

#ifdef HL2_EPISODIC
	SetBloodColor( BLOOD_COLOR_ZOMBIE );
#else
	SetBloodColor( BLOOD_COLOR_GREEN );
#endif // HL2_EPISODIC

	m_iHealth			= sk_rebel_zombie_health.GetFloat();
	m_flFieldOfView		= 0.2;

	CapabilitiesClear();

	CapabilitiesAdd( bits_CAP_USE_WEAPONS );
	CapabilitiesAdd( bits_CAP_MOVE_SHOOT );

	//GetNavigator()->SetRememberStaleNodes( false );

	BaseClass::Spawn();

	m_flNextMoanSound = gpGlobals->curtime + random->RandomFloat( 1.0, 4.0 );
}
开发者ID:KyleGospo,项目名称:City-17-Episode-One-Source,代码行数:30,代码来源:npc_rebelzombie.cpp


示例5: GetModelName

//-----------------------------------------------------------------------------
// Spawn
//-----------------------------------------------------------------------------
void CNPC_Kleiner::Spawn()
{
	// Allow custom model usage (mostly for monitors)
	char *szModel = (char *)STRING( GetModelName() );
	if (!szModel || !*szModel)
	{
		szModel = "models/kleiner.mdl";
		SetModelName( AllocPooledString(szModel) );
	}

	Precache();
	SetModel( szModel );

	BaseClass::Spawn();

	SetHullType(HULL_HUMAN);
	SetHullSizeNormal();

	SetSolid( SOLID_BBOX );
	AddSolidFlags( FSOLID_NOT_STANDABLE );
	SetMoveType( MOVETYPE_STEP );
	SetBloodColor( BLOOD_COLOR_RED );
	m_iHealth			= 8;
	m_flFieldOfView		= 0.5;// indicates the width of this NPC's forward view cone ( as a dotproduct result )
	m_NPCState			= NPC_STATE_NONE;
	
	CapabilitiesAdd( bits_CAP_MOVE_GROUND | bits_CAP_OPEN_DOORS | bits_CAP_ANIMATEDFACE | bits_CAP_TURN_HEAD );
	CapabilitiesAdd( bits_CAP_FRIENDLY_DMG_IMMUNE );

	AddEFlags( EFL_NO_DISSOLVE | EFL_NO_MEGAPHYSCANNON_RAGDOLL | EFL_NO_PHYSCANNON_INTERACTION );

	NPCInit();
}
开发者ID:Adidasman1,项目名称:source-sdk-2013,代码行数:36,代码来源:npc_kleiner.cpp


示例6: Precache

//-----------------------------------------------------------------------------
// Spawn
//-----------------------------------------------------------------------------
void CNPC_GMan::Spawn()
{
	Precache();

	BaseClass::Spawn();

	SetModel( "models/gman.mdl" );

	SetHullType(HULL_HUMAN);
	SetHullSizeNormal();

	SetSolid( SOLID_BBOX );
	AddSolidFlags( FSOLID_NOT_STANDABLE );
	SetMoveType( MOVETYPE_STEP );
	SetBloodColor( BLOOD_COLOR_RED );
	m_iHealth			= 8;
	m_flFieldOfView		= 0.5;// indicates the width of this NPC's forward view cone ( as a dotproduct result )
	m_NPCState			= NPC_STATE_NONE;
	SetImpactEnergyScale( 0.0f ); // no physics damage on the gman
	
	CapabilitiesAdd( bits_CAP_MOVE_GROUND | bits_CAP_OPEN_DOORS | bits_CAP_ANIMATEDFACE | bits_CAP_TURN_HEAD );
	CapabilitiesAdd( bits_CAP_FRIENDLY_DMG_IMMUNE );
	AddEFlags( EFL_NO_DISSOLVE | EFL_NO_MEGAPHYSCANNON_RAGDOLL );

	NPCInit();
}
开发者ID:Au-heppa,项目名称:source-sdk-2013,代码行数:29,代码来源:npc_gman.cpp


示例7: Precache

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CNPC_Bug_Warrior::Spawn( void )
{
	Precache();

	SetModel( BUG_WARRIOR_MODEL );

	SetHullType(HULL_WIDE_HUMAN);//HULL_WIDE_SHORT;
	SetHullSizeNormal();
	SetDefaultEyeOffset();
	SetViewOffset( (WorldAlignMins() + WorldAlignMaxs()) * 0.5 );	// See from my center
	SetDistLook( 1024.0 );
	
	SetNavType(NAV_GROUND);
	m_NPCState		= NPC_STATE_NONE;
	SetBloodColor( BLOOD_COLOR_YELLOW );
	m_iHealth		= npc_bug_warrior_health.GetFloat();

	SetSolid( SOLID_BBOX );
	AddSolidFlags( FSOLID_NOT_STANDABLE );
	SetMoveType( MOVETYPE_STEP );

	m_iszPatrolPathName = NULL_STRING;

	// Only do this if a squadname appears in the entity
	if ( m_SquadName != NULL_STRING )
	{
		CapabilitiesAdd( bits_CAP_SQUAD );
	}

	CapabilitiesAdd( bits_CAP_MOVE_GROUND | bits_CAP_INNATE_MELEE_ATTACK1 );

	NPCInit();

	BaseClass::Spawn();
}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:38,代码来源:npc_bug_warrior.cpp


示例8: Precache

void CNPC_Infected::Spawn()
{
	Precache();

	SetZombieModel();
	BaseClass::Spawn();

	SetHullType( HULL_HUMAN );
	SetHullSizeNormal();
	SetDefaultEyeOffset();
	
	SetNavType( NAV_GROUND );
	m_NPCState = NPC_STATE_NONE;
	
	m_iHealth = m_iMaxHealth = sk_infected_health.GetInt();

	m_flFieldOfView		= 0.2;

	SetSolid( SOLID_BBOX );
	AddSolidFlags( FSOLID_NOT_STANDABLE );
	SetMoveType( MOVETYPE_STEP );

	SetupGlobalModelData();
	
	CapabilitiesAdd( bits_CAP_MOVE_GROUND );
	CapabilitiesAdd( bits_CAP_INNATE_MELEE_ATTACK1 );

	NPCInit();
}
开发者ID:wrenchmods,项目名称:Sleepless,代码行数:29,代码来源:npc_infected.cpp


示例9: Precache

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CTDP_NPC_CombineS::Spawn( void )
{
	Precache();
	SetModel( STRING( GetModelName() ) );

	if( IsElite() )
	{
		// Stronger, tougher.
		SetHealth( sk_combine_guard_health.GetFloat() );
		SetMaxHealth( sk_combine_guard_health.GetFloat() );
		SetKickDamage( sk_combine_guard_kick.GetFloat() );
	}
	else
	{
		SetHealth( sk_combine_s_health.GetFloat() );
		SetMaxHealth( sk_combine_s_health.GetFloat() );
		SetKickDamage( sk_combine_s_kick.GetFloat() );
	}

	CapabilitiesAdd( bits_CAP_ANIMATEDFACE );
	CapabilitiesAdd( bits_CAP_MOVE_SHOOT );
	CapabilitiesAdd( bits_CAP_DOORS_GROUP );

	BaseClass::Spawn();
}
开发者ID:jrbedard,项目名称:troy-divine-playground,代码行数:28,代码来源:tdp_npc_combines.cpp


示例10: Precache

//=========================================================
// Spawn
//=========================================================
void CNPC_Houndeye::Spawn()
{
	Precache( );

	SetModel("models/houndeye.mdl");
	SetHullType(HULL_WIDE_SHORT);
	SetHullSizeNormal();

	SetSolid( SOLID_BBOX );
	AddSolidFlags( FSOLID_NOT_STANDABLE );
	SetMoveType( MOVETYPE_STEP );
	SetBloodColor( BLOOD_COLOR_YELLOW );
	m_iHealth			= sk_Houndeye_health.GetFloat();
	m_flFieldOfView		= 0.5;// indicates the width of this monster's forward view cone ( as a dotproduct result )
	m_NPCState			= NPC_STATE_NONE;
	m_fAsleep			= false; // everyone spawns awake
	m_fDontBlink		= false;
	CapabilitiesAdd( bits_CAP_SQUAD );
	CapabilitiesAdd( bits_CAP_MOVE_GROUND );
	CapabilitiesAdd( bits_CAP_INNATE_RANGE_ATTACK1 );
	CapabilitiesAdd( bits_CAP_TURN_HEAD );

	m_flNextSecondaryAttack = 0;
	m_bLoopClockwise		= random->RandomInt(0,1) ? true : false;

	m_pEnergyWave			= NULL;
	m_flEndEnergyWaveTime	= 0;

	SetCollisionGroup( HL2COLLISION_GROUP_HOUNDEYE ); 

	NPCInit();
}
开发者ID:AluminumKen,项目名称:hl2sb-src,代码行数:35,代码来源:npc_houndeye.cpp


示例11: Precache

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CNPC_CombineS::Spawn( void )
{
	Precache();
	SetModel( STRING( GetModelName() ) );

	if( IsElite() )
	{
		// Stronger, tougher.
		SetHealth( sk_combine_guard_health.GetFloat() );
		SetMaxHealth( sk_combine_guard_health.GetFloat() );
		SetKickDamage( sk_combine_guard_kick.GetFloat() );
	}
	else
	{
		SetHealth( sk_combine_s_health.GetFloat() );
		SetMaxHealth( sk_combine_s_health.GetFloat() );
		SetKickDamage( sk_combine_s_kick.GetFloat() );
	}

	CapabilitiesAdd( bits_CAP_ANIMATEDFACE );
	CapabilitiesAdd( bits_CAP_MOVE_SHOOT );
	CapabilitiesAdd( bits_CAP_DOORS_GROUP );

	BaseClass::Spawn();

#if HL2_EPISODIC
	if (m_iUseMarch && !HasSpawnFlags(SF_NPC_START_EFFICIENT))
	{
		Msg( "Soldier %s is set to use march anim, but is not an efficient AI. The blended march anim can only be used for dead-ahead walks!\n", GetDebugName() );
	}
#endif
}
开发者ID:Adidasman1,项目名称:source-sdk-2013,代码行数:35,代码来源:npc_combines.cpp


示例12: CLEARBITS

//-----------------------------------------------------------------------------
// Purpose: Tell the driver to start firing at targets
//-----------------------------------------------------------------------------
void CNPC_VehicleDriver::InputStartFiring( inputdata_t &inputdata )
{
	CLEARBITS( m_spawnflags, SF_VEHICLEDRIVER_INACTIVE );
	SetCondition( COND_PROVOKED );

	float flMinRange, flMaxRange;
	// If the vehicle has a weapon, set our capability
	if ( m_pVehicleInterface->NPC_HasPrimaryWeapon() )
	{
		CapabilitiesAdd( bits_CAP_INNATE_RANGE_ATTACK1 );
		m_pVehicleInterface->Weapon_PrimaryRanges( &flMinRange, &flMaxRange );

		// Ensure the look distances is long enough
		if ( m_flDistTooFar < flMaxRange || GetSenses()->GetDistLook() < flMaxRange )
		{
			m_flDistTooFar = flMaxRange;
			SetDistLook( flMaxRange );
		}
	}

	if ( m_pVehicleInterface->NPC_HasSecondaryWeapon() )
	{
		CapabilitiesAdd( bits_CAP_INNATE_RANGE_ATTACK2 );
		m_pVehicleInterface->Weapon_SecondaryRanges( &flMinRange, &flMaxRange );

		// Ensure the look distances is long enough
		if ( m_flDistTooFar < flMaxRange || GetSenses()->GetDistLook() < flMaxRange )
		{
			m_flDistTooFar = flMaxRange;
			SetDistLook( flMaxRange );
		}
	}
}
开发者ID:BenLubar,项目名称:SwarmDirector2,代码行数:36,代码来源:npc_vehicledriver.cpp


示例13: Precache

//=========================================================
// Spawn
//=========================================================
void CNPC_HAssassin::Spawn()
{
	Precache( );

	SetModel( "models/hassassin.mdl");
	
	SetHullType(HULL_HUMAN);
	SetHullSizeNormal();


	SetNavType ( NAV_GROUND );
	SetSolid( SOLID_BBOX );
	AddSolidFlags( FSOLID_NOT_STANDABLE );
	SetMoveType( MOVETYPE_STEP );
	m_bloodColor		= BLOOD_COLOR_RED;
    ClearEffects();
	m_iHealth			= sk_hassassin_health.GetFloat();
	m_flFieldOfView		= VIEW_FIELD_WIDE; // indicates the width of this monster's forward view cone ( as a dotproduct result )
	m_NPCState			= NPC_STATE_NONE;
	
	m_HackedGunPos		= Vector( 0, 24, 48 );

	m_iTargetRanderamt	= 20;
	SetRenderColor( 255, 255, 255, 20 );
	m_nRenderMode		= kRenderTransTexture;

	CapabilitiesClear();
	CapabilitiesAdd( bits_CAP_MOVE_GROUND );
	CapabilitiesAdd( bits_CAP_INNATE_RANGE_ATTACK1 | bits_CAP_INNATE_RANGE_ATTACK2 | bits_CAP_INNATE_MELEE_ATTACK1 );

	NPCInit();
}
开发者ID:AgentAgrimar,项目名称:source-sdk-trilogy,代码行数:35,代码来源:hl1_npc_hassassin.cpp


示例14: SetSolid

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CNPC_Eli::SetupWithoutParent( void )
{
	SetSolid( SOLID_BBOX );
	AddSolidFlags( FSOLID_NOT_STANDABLE );
	SetMoveType( MOVETYPE_STEP );

	CapabilitiesAdd( bits_CAP_MOVE_GROUND | bits_CAP_OPEN_DOORS | bits_CAP_ANIMATEDFACE | bits_CAP_TURN_HEAD );
	CapabilitiesAdd( bits_CAP_FRIENDLY_DMG_IMMUNE );
}
开发者ID:Muini,项目名称:Nag-asw,代码行数:12,代码来源:npc_eli.cpp


示例15: Precache

//-----------------------------------------------------------------------------
// Purpose: 
//
//
//-----------------------------------------------------------------------------
void CNPC_Assassin::Spawn( void )
{
	Precache();

	SetModel( "models/fassassin.mdl" );

	SetHullType(HULL_HUMAN);
	SetHullSizeNormal();

	SetSolid( SOLID_BBOX );
	AddSolidFlags( FSOLID_NOT_STANDABLE );
	SetMoveType( MOVETYPE_STEP );
	SetBloodColor( BLOOD_COLOR_RED );
	
	m_iHealth			= sk_assassin_health.GetFloat();
	m_flFieldOfView		= 0.1;
	m_NPCState			= NPC_STATE_NONE;

	CapabilitiesClear();
	CapabilitiesAdd( bits_CAP_MOVE_CLIMB | bits_CAP_MOVE_GROUND | bits_CAP_MOVE_JUMP );
	CapabilitiesAdd( bits_CAP_SQUAD | bits_CAP_USE_WEAPONS | bits_CAP_AIM_GUN | bits_CAP_INNATE_RANGE_ATTACK1 | bits_CAP_INNATE_RANGE_ATTACK2 | bits_CAP_INNATE_MELEE_ATTACK1 );

	//Turn on our guns
	SetBodygroup( 1, 1 );

	int attachment = LookupAttachment( "Eye" );

	// Start up the eye glow
	m_pEyeSprite = CSprite::SpriteCreate( "sprites/redglow1.vmt", GetLocalOrigin(), false );

	if ( m_pEyeSprite != NULL )
	{
		m_pEyeSprite->SetAttachment( this, attachment );
		m_pEyeSprite->SetTransparency( kRenderTransAdd, 255, 255, 255, 200, kRenderFxNone );
		m_pEyeSprite->SetScale( 0.25f );
	}

	// Start up the eye trail
	m_pEyeTrail	= CSpriteTrail::SpriteTrailCreate( "sprites/bluelaser1.vmt", GetLocalOrigin(), false );

	if ( m_pEyeTrail != NULL )
	{
		m_pEyeTrail->SetAttachment( this, attachment );
		m_pEyeTrail->SetTransparency( kRenderTransAdd, 255, 0, 0, 200, kRenderFxNone );
		m_pEyeTrail->SetStartWidth( 8.0f );
		m_pEyeTrail->SetLifeTime( 0.75f );
	}

	NPCInit();

	m_bEvade = false;
	m_bAggressive = false;
}
开发者ID:0xFEEDC0DE64,项目名称:UltraGame,代码行数:58,代码来源:npc_assassin.cpp


示例16: SetHullType

void CASW_Parasite::Spawn( void )
{	
	SetHullType(HULL_TINY);

	BaseClass::Spawn();

	SetModel( SWARM_PARASITE_MODEL);

	if (FClassnameIs(this, "asw_parasite_defanged"))
	{
		m_bDefanged = true;
		m_iHealth	= ASWGameRules()->ModifyAlienHealthBySkillLevel(10);
		SetBodygroup( 0, 1 );
		m_fSuicideTime = gpGlobals->curtime + 60;
	}
	else
	{
		m_bDefanged = false;
		m_iHealth	= ASWGameRules()->ModifyAlienHealthBySkillLevel(25);
		SetBodygroup( 0, 0 );
		m_fSuicideTime = 0;
	}

	SetMoveType( MOVETYPE_STEP );
	SetHullType(HULL_TINY);
	SetCollisionGroup( ASW_COLLISION_GROUP_PARASITE );
	SetViewOffset( Vector(6, 0, 11) ) ;		// Position of the eyes relative to NPC's origin.

	m_NPCState	= NPC_STATE_NONE;

	CapabilitiesAdd( bits_CAP_MOVE_GROUND | bits_CAP_INNATE_RANGE_ATTACK1 );

	m_bInfesting = false;
	
}
开发者ID:detoxhby,项目名称:SwarmDirector2,代码行数:35,代码来源:asw_parasite.cpp


示例17: Precache

//-----------------------------------------------------------------------------
// Purpose: 
//
//
//-----------------------------------------------------------------------------
void CNPC_Blob::Spawn( void )
{
	Precache();

	SetModel( NPC_BLOB_MODEL );

	SetHullType(HULL_TINY);
	SetHullSizeNormal();

	SetSolid( SOLID_NONE );
	AddSolidFlags( FSOLID_NOT_STANDABLE );
	SetMoveType( MOVETYPE_STEP );
	SetBloodColor( BLOOD_COLOR_RED );
	m_iHealth			= INT_MAX;
	m_flFieldOfView		= -1.0f;
	m_NPCState			= NPC_STATE_NONE;

	CapabilitiesClear();
	CapabilitiesAdd( bits_CAP_MOVE_GROUND );

	m_Elements.RemoveAll();

	NPCInit();

	AddEffects( EF_NODRAW );

	m_flMinElementDist = blob_mindist.GetFloat();
}
开发者ID:Adidasman1,项目名称:source-sdk-2013,代码行数:33,代码来源:npc_blob.cpp


示例18: Precache

//=========================================================
// Spawn
//=========================================================
void CNPC_Bullsquid::Spawn()
{
	Precache( );

	SetModel( "models/bullsquid.mdl");
	SetHullType(HULL_WIDE_SHORT);
	SetHullSizeNormal();

	SetSolid( SOLID_BBOX );
	AddSolidFlags( FSOLID_NOT_STANDABLE );
	SetMoveType( MOVETYPE_STEP );
	m_bloodColor		= BLOOD_COLOR_GREEN;
	
	SetRenderColor( 255, 255, 255, 255 );
	
	m_iHealth			= sk_bullsquid_health.GetFloat();
	m_flFieldOfView		= 0.2;// indicates the width of this monster's forward view cone ( as a dotproduct result )
	m_NPCState			= NPC_STATE_NONE;
	
	CapabilitiesClear();
	CapabilitiesAdd( bits_CAP_MOVE_GROUND | bits_CAP_INNATE_RANGE_ATTACK1 | bits_CAP_INNATE_MELEE_ATTACK1 | bits_CAP_INNATE_MELEE_ATTACK2 );
	
	m_fCanThreatDisplay	= TRUE;
	m_flNextSpitTime = gpGlobals->curtime;

	NPCInit();

	m_flDistTooFar		= 784;
}
开发者ID:hitmen047,项目名称:TF2HLCoop,代码行数:32,代码来源:hl1_npc_bullsquid.cpp


示例19: Precache

//=========================================================
// Spawn()
// Crear un nuevo 
//=========================================================
void CNPC_Scient::Spawn()
{
	Precache();

	// Modelo y color de sangre.
	SetModel(MODEL_BASE);
	SetBloodColor(BLOOD);

	// Tamaño
	SetHullType(HULL_WIDE_SHORT);
	SetHullSizeNormal();

	// Navegación, estado físico y opciones extra.
	SetSolid(SOLID_BBOX);
	SetNavType(NAV_GROUND);	
	AddSolidFlags(FSOLID_NOT_STANDABLE);
	SetMoveType(MOVETYPE_STEP);
	
	SetRenderColor(255, 255, 255, 255);
	SetDistLook(SEE_DIST);

	// Reseteo de variables.
	// Salud, estado del NPC y vista.
	m_iHealth			= sk_scient_health.GetFloat();
	m_NPCState			= NPC_STATE_NONE;
	m_flFieldOfView		= FOV;

	// Capacidades
	CapabilitiesClear();
	CapabilitiesAdd(CAPABILITIES);

	NPCInit();
	BaseClass::Spawn();
}
开发者ID:InfoSmart,项目名称:InSource-Singleplayer,代码行数:38,代码来源:npc_scient.cpp


示例20: CapabilitiesAdd

void CASW_Alien_Jumper::Spawn()
{
	BaseClass::Spawn();
	
	CapabilitiesAdd( bits_CAP_MOVE_JUMP );
	m_bDisableJump = false;
}
开发者ID:BenLubar,项目名称:riflemod,代码行数:7,代码来源:asw_alien_jumper.cpp



注:本文中的CapabilitiesAdd函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ Capacity函数代码示例发布时间:2022-05-30
下一篇:
C++ Canvas函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap