您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetPortInt函数代码示例

51自学网 2021-06-01 21:13:13
  C++
这篇教程C++ GetPortInt函数代码示例写得很实用,希望能帮到您。

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

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

示例1: ProcessEvent

	virtual void ProcessEvent( EFlowEvent event, SActivationInfo *pActInfo )	{		switch(event)		{		case eFE_Update:			{							}			break;		case eFE_Activate:			{				if(IsPortActive(pActInfo, EIP_Get))				{								gEnv->pGame->GetIGameFramework()->RegisterListener(this, "FlowMouseEntitiesInBox", FRAMEWORKLISTENERPRIORITY_DEFAULT);					m_get = true;					m_actInfo = *pActInfo;					m_screenX = GetPortInt(pActInfo, EIP_ScreenX);					m_screenY = GetPortInt(pActInfo, EIP_ScreenY);					m_screenX2 = GetPortInt(pActInfo, EIP_ScreenX2);					m_screenY2 = GetPortInt(pActInfo, EIP_ScreenY2);				}				break;			}		}	}
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:26,


示例2: switch

void CFlashUIEventNode::ProcessEvent( EFlowEvent event,SActivationInfo* pActInfo ){	switch (event)	{	case eFE_Initialize:	{		pActInfo->pGraph->SetRegularlyUpdated(pActInfo->myID, true);		m_events.clear();		m_events.init( pActInfo->pGraph );		ClearListener();		m_iCurrInstanceId = GetPortInt(pActInfo, eI_InstanceID);		if (m_iCurrInstanceId < -1)			m_iCurrInstanceId = -1;		SPerInstanceCall0 caller;		caller.Execute(m_pElement, m_iCurrInstanceId, functor(*this, &CFlashUIEventNode::RegisterAsListener));	}	break;	case eFE_Activate:		if (IsPortActive( pActInfo, eI_InstanceID ))		{			m_iCurrInstanceId = GetPortInt(pActInfo, eI_InstanceID);			if (m_iCurrInstanceId < -1)				m_iCurrInstanceId = -1;			ClearListener();			SPerInstanceCall0 caller;			caller.Execute(m_pElement, m_iCurrInstanceId, functor(*this, &CFlashUIEventNode::RegisterAsListener));		}		break;	case eFE_Update:		FlushNextEvent( pActInfo );		break;	}}
开发者ID:joewan,项目名称:pycmake,代码行数:35,


示例3: OnInputEvent

    // ~IInputEventListener    virtual bool OnInputEvent( const SInputEvent &event )    {        if (true == m_bActive)        {#if defined(ORBIS)	// FIXME: Using PS3 inputs for ORBIS            int nThisKey = event.keyId;            int nKey = -1;            int nInput = GetPortInt(&m_actInfo, EIP_Key);            int tableSize = sizeof(PS3KeyTable)/sizeof(PS3KeyTable[0]);            if ( nInput>=0 && nInput<tableSize )                nKey = PS3KeyTable[nInput];#else            // Translate key, check value            const int nThisKey = TranslateKey(event.keyId);            const int nKey = GetPortInt(&m_actInfo, EIP_Key);#endif            if (nKey == nThisKey)            {                // Return based on state                if (eIS_Pressed == event.state)                    ActivateOutput(&m_actInfo, EOP_Pressed, true);                else if (eIS_Released == event.state)                    ActivateOutput(&m_actInfo, EOP_Released, true);            }        }        // Let other listeners handle it        return false;    }
开发者ID:souxiaosou,项目名称:FireNET,代码行数:30,


示例4: Serialize

	virtual void Serialize(SActivationInfo *pActInfo, TSerialize ser)	{		ser.BeginGroup("Local");		ser.Value("Active", m_bActive);		if (m_bActive)		{			ser.Value("position", m_position);			ser.Value("destination", m_destination);			ser.Value("startPos", m_startPos);			ser.Value("lastFrameTime", m_lastFrameTime);			ser.Value("topSpeed", m_topSpeed);			ser.Value("easeInDistance", m_easeInDistance);			ser.Value("easeOutDistance", m_easeOutDistance);			ser.Value("stopping", m_stopping);			ser.Value("startTime", m_startTime);			ser.Value("bForceFinishAsTooNear", m_bForceFinishAsTooNear);		}		ser.EndGroup();		if (ser.IsReading())		{			m_coorSys = (ECoordSys)GetPortInt( pActInfo, IN_COORDSYS );			m_valueType = (EValueType)GetPortInt(pActInfo, IN_VALUETYPE);		}	}
开发者ID:aronarts,项目名称:FireNET,代码行数:25,


示例5: ReadCurrentInputParams

	//----------------------------------------------------------------------	void ReadCurrentInputParams( SActivationInfo* pActInfo, SInputParams &inputParams )	{		int presetIndex = GetPortInt( pActInfo, EIP_Preset );		if (presetIndex > 0 && presetIndex <= NUM_PRESETS)		{			inputParams       = m_Presets[presetIndex - 1];			inputParams.angle = Ang3(DEG2RAD(m_Presets[presetIndex - 1].angle));		}		else		{			inputParams.groundOnly      = GetPortBool(pActInfo, EIP_GroundOnly);			inputParams.isSmooth        = GetPortBool(pActInfo, EIP_Smooth);			inputParams.restriction     = eRestriction( GetPortInt(pActInfo, EIP_Restriction));			inputParams.view            = eViewType( GetPortInt(pActInfo, EIP_ViewType));			inputParams.angle           = Ang3(DEG2RAD(GetPortVec3(pActInfo, EIP_Angle)));			inputParams.shift           = GetPortVec3(pActInfo, EIP_Shift);			inputParams.frequency       = GetPortFloat(pActInfo, EIP_Frequency);			inputParams.randomness      = GetPortFloat(pActInfo, EIP_Randomness);			inputParams.distance        = GetPortFloat(pActInfo, EIP_Distance);			inputParams.rangeMin        = GetPortFloat(pActInfo, EIP_RangeMin);			inputParams.rangeMax        = GetPortFloat(pActInfo, EIP_RangeMax);			inputParams.sustainDuration = GetPortFloat(pActInfo, EIP_SustainDuration);			inputParams.fadeInDuration  = GetPortFloat(pActInfo, EIP_FadeInDuration);			inputParams.fadeOutDuration = GetPortFloat(pActInfo, EIP_FadeOutDuration);		}	}
开发者ID:joewan,项目名称:pycmake,代码行数:27,


示例6: ProcessEvent

	virtual void ProcessEvent( EFlowEvent event, SActivationInfo * pActInfo )	{		switch (event)		{		case eFE_Initialize:		case eFE_Activate:			if (IsPortActive(pActInfo, 0))			{				int minOut = GetPortInt(pActInfo,1);				int maxOut = GetPortInt(pActInfo,2);				minOut = CLAMP(minOut, 0, NUM_OUTPUTS);				maxOut = CLAMP(maxOut, 0, NUM_OUTPUTS);				if (maxOut < minOut) 					std::swap(minOut, maxOut);				int n = cry_random(minOut, maxOut);				// Collect the outputs to use				static int	out[NUM_OUTPUTS];				for (unsigned i = 0; i < NUM_OUTPUTS; i++)					out[i] = -1;				int nout = 0;				for (int i = 0; i < NUM_OUTPUTS; i++)				{					if (IsOutputConnected(pActInfo, i))					{						out[nout] = i;						nout++;					}				}				if (n > nout)					n = nout;				// Shuffle				for (int i = 0; i < n; i++)					std::swap(out[i], out[cry_random(0, nout - 1)]);				// Set outputs.				for (int i = 0; i < n; i++)				{					if (out[i] == -1)						continue;					ActivateOutput(pActInfo,out[i],GetPortAny(pActInfo, 0));				}			}			break;		}	}
开发者ID:aronarts,项目名称:FireNET,代码行数:50,


示例7: Execute

	virtual bool Execute(SActivationInfo *pActInfo)	{		bool bResult = false;		SXmlDocument *doc;		if (GDM->GetXmlDocument(pActInfo->pGraph, &doc) && doc->active)		{			const char* childName = GetPortString(pActInfo, EIP_Name);			const int childIndex = GetPortInt(pActInfo, EIP_Index);			const int childCount = doc->active->getChildCount();			XmlNodeRef ref = NULL;			for (int i = 0, realCount = 0; i < childCount; ++i)			{				ref = doc->active->getChild(i);				if (ref && strcmp(ref->getTag(), childName) == 0)				{					if (++realCount >= childIndex)					{						doc->active->deleteChildAt(i);						bResult = true;						break;					}				}			}		}		return bResult;	}
开发者ID:aronarts,项目名称:FireNET,代码行数:28,


示例8: UpdateUIElement

void CFlashUIWorldScreenPosNode::ProcessEvent( EFlowEvent event, SActivationInfo *pActInfo ){    if ( event == eFE_Initialize )    {        UpdateUIElement( GetPortString( pActInfo, eI_UIElement ), pActInfo );    }    else if ( event == eFE_Activate )    {        if ( IsPortActive( pActInfo, eI_UIElement ) )        {            UpdateUIElement( GetPortString( pActInfo, eI_UIElement ), pActInfo );        }        if ( IsPortActive( pActInfo, eI_Get ) )        {            const int instanceId = GetPortInt(pActInfo, eI_InstanceID);            Vec3 worldPos = GetPortVec3(pActInfo, eI_WorldPos);            Vec3 offset = GetPortVec3(pActInfo, eI_Offset);            const bool scaleMode = GetPortBool(pActInfo, eI_ScaleMode);            SPerInstanceCall3< Vec3&, Vec3&, bool > caller;            if ( !caller.Execute(GetElement(), instanceId, functor(*this, &CFlashUIWorldScreenPosNode::GetScreenPosFromWorld), worldPos, offset, scaleMode, false) )            {                UIACTION_WARNING( "FG: UIElement /"%s/" called get screenpos for multiple instances! (passed instanceId %i), referenced at node /"%s/"", GetPortString(pActInfo, eI_UIElement).c_str(), instanceId, pActInfo->pGraph->GetNodeTypeName( pActInfo->myID ) );            }            ActivateOutput( pActInfo, eO_ScreenPos, worldPos);            ActivateOutput( pActInfo, eO_Scale, offset.z);            ActivateOutput( pActInfo, eO_IsOnScreen, offset.x == 0 && offset.y == 0);            offset.z = 0;            ActivateOutput( pActInfo, eO_OverScanBorder, offset);            ActivateOutput( pActInfo, eO_OnGet, true );        }    }}
开发者ID:souxiaosou,项目名称:FireNET,代码行数:35,


示例9: CRY_ASSERT

void CFlowNode_PrefabEventSource::ProcessEvent( EFlowEvent event, SActivationInfo *pActInfo ){	ICustomEventManager* pCustomEventManager = gEnv->pGame->GetIGameFramework()->GetICustomEventManager();	CRY_ASSERT( pCustomEventManager != NULL );	if ( event == eFE_Activate )	{		if ( IsPortActive( pActInfo, EIP_FireEvent) )		{			if ( m_eventId != CUSTOMEVENTID_INVALID )			{				pCustomEventManager->FireEvent( m_eventId );			}			// Output port is activated from event		}	}	else if (event == eFE_Initialize)	{		m_actInfo = *pActInfo;		const TCustomEventId eventId = (TCustomEventId)GetPortInt( pActInfo, EIP_EventId );		if ( eventId != CUSTOMEVENTID_INVALID )		{			pCustomEventManager->RegisterEventListener( this, eventId );		}		m_eventId = eventId;	}}
开发者ID:aronarts,项目名称:FireNET,代码行数:29,


示例10: GetDynStartPort

void CFlashUIFunctionNode::ProcessEvent( EFlowEvent event,SActivationInfo* pActInfo ){	if (event == eFE_Activate && IsPortActive(pActInfo, eI_Call))	{		int          port = GetDynStartPort();		SUIArguments args;		for (TUIParams::const_iterator iter = m_funcDesc.InputParams.Params.begin(); iter != m_funcDesc.InputParams.Params.end(); ++iter)		{			GetDynInput( args, *iter, pActInfo, port++ );		}		TUIData   res;		const int instanceId = GetPortInt( pActInfo, eI_InstanceID );		if (IsTemplate() && !UpdateTmplDesc( GetPortString(pActInfo, eI_TemplateInstanceName), pActInfo ))			return;		SPerInstanceCall2< const SUIArguments &, TUIData & > caller;		caller.Execute(m_pElement, instanceId, functor(*this, &CFlashUIFunctionNode::CallFunction), args, res);		string out;		res.GetValueWithConversion( out );		ActivateOutput( pActInfo, eO_RetVal, out  );		ActivateOutput( pActInfo, eO_OnCall, true );	}}
开发者ID:joewan,项目名称:pycmake,代码行数:27,


示例11: UpdateUIElement

void CFlashUIMCTemplateRemoveNode::ProcessEvent( EFlowEvent event,SActivationInfo* pActInfo ){	if (event == eFE_Initialize)	{		UpdateUIElement( GetPortString( pActInfo, eI_UIElement ), pActInfo );	}	else if (event == eFE_Activate)	{		if (IsPortActive( pActInfo, eI_UIElement ))		{			UpdateUIElement( GetPortString( pActInfo, eI_UIElement ), pActInfo );		}		if (!UpdateTmplDesc( GetPortString( pActInfo, eI_TemplateInstanceName ), pActInfo ))			return;		if (GetElement() && IsPortActive(pActInfo, eI_Remove))		{			const int instanceId = GetPortInt( pActInfo, eI_InstanceID );			SPerInstanceCall1< const SUIMovieClipDesc* > caller;			caller.Execute(GetElement(), instanceId, functor(*this, &CFlashUIMCTemplateRemoveNode::RemoveMoviclip), GetTmplDesc(true), false);			ActivateOutput( pActInfo, eO_OnRemove, true );		}	}}
开发者ID:joewan,项目名称:pycmake,代码行数:28,


示例12: data

Assignment DefendAreaAssignmentFlowNode::SpecifyAssignment( SActivationInfo* pActInfo ){	SmartScriptTable data(gEnv->pScriptSystem);	data->SetValue("position", GetPortVec3(pActInfo, InputPort_Position));	data->SetValue("radius", GetPortInt(pActInfo, InputPort_Radius));	return Assignment(Assignment::DefendArea, data);}
开发者ID:Kufusonic,项目名称:Work-in-Progress-Sonic-Fangame,代码行数:7,


示例13: switch

// ---------------------------------------------------------------void CFlashUIBaseNodeDynPorts::GetDynInput( SUIArguments &args, const SUIParameterDesc &desc, SActivationInfo* pActInfo, int port){	switch (desc.eType)	{	case SUIParameterDesc::eUIPT_Bool:		args.AddArgument( GetPortBool(pActInfo, port));		break;	case SUIParameterDesc::eUIPT_Int:		args.AddArgument( GetPortInt(pActInfo, port));		break;	case SUIParameterDesc::eUIPT_Float:		args.AddArgument( GetPortFloat(pActInfo, port));		break;	case SUIParameterDesc::eUIPT_String:		args.AddArgument( GetPortString(pActInfo, port));		break;	case SUIParameterDesc::eUIPT_WString:		args.AddArgument( GetPortString(pActInfo, port), eUIDT_WString );		break;	case SUIParameterDesc::eUIPT_Vec3:		args.AddArgument( GetPortVec3(pActInfo, port));		break;	default:	{		string               val;		const TFlowInputData data = GetPortAny(pActInfo, port);		data.GetValueWithConversion(val);		args.AddArgument(val, eUIDT_Any);	}	break;	}}
开发者ID:joewan,项目名称:pycmake,代码行数:33,


示例14: GetInputActor

void CSetEquipmentLoadoutNode ::ProcessEvent( EFlowEvent event, SActivationInfo *pActInfo ){	if(event == eFE_Activate && IsPortActive(pActInfo, 0))	{		if(pActInfo->pEntity)		{			IActor* pActor = GetInputActor( pActInfo );			CGameRules *pGameRules = g_pGame->GetGameRules();			if(pActor)			{				int packIndex = GetPortInt(pActInfo, eI_EquipLoadout);				CEquipmentLoadout *pEquipmentLoadout = g_pGame->GetEquipmentLoadout();				if(pEquipmentLoadout)				{					pEquipmentLoadout->SetSelectedPackage(packIndex);					pGameRules->SetPendingLoadoutChange();				}			}		}	}}
开发者ID:PiratesAhoy,项目名称:HeartsOfOak-Core,代码行数:25,


示例15: ProcessEvent

	virtual void ProcessEvent(EFlowEvent event, SActivationInfo* pActInfo)	{		switch (event)		{		case eFE_Initialize:			{				break;			}		case eFE_Activate:			{				const string& variableName = GetPortString(pActInfo, eIn_VariableName);				if (variableName.empty())				{					CryWarning(VALIDATOR_MODULE_GAME, VALIDATOR_WARNING, "CAction:DRS_SetVariable: Cannot be executed without a Variable Name.");					return;				}				const string& collectionName = GetPortString(pActInfo, eIn_VariableCollectionName);				EntityId entityID = GetPortEntityId(pActInfo, eIn_EntityID);				DRS::IVariableCollection* variableCollection = GetVariableCollection(entityID, collectionName);				if (variableCollection)				{					int newVariableValue = GetPortInt(pActInfo, eIn_IntegerValue);					variableCollection->SetVariableValue(variableName, newVariableValue, true, GetPortFloat(pActInfo, eIn_ResetTime));					ActivateOutput(pActInfo, eOut_VariableCollectionName, variableCollection->GetName().GetText());				}				break;			}		}	}
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:34,


示例16: StoreRayType

	void StoreRayType()	{		int ray_type = GetPortInt(&m_actInfo, EIP_RayType);		switch(ray_type)		{		case 0:			m_rayTypeFilter = ent_all;			break;		case 1:			m_rayTypeFilter = ent_terrain;			break;		case 2:			m_rayTypeFilter = ent_rigid;			break;		case 3:			m_rayTypeFilter = ent_static;			break;		case 4:			m_rayTypeFilter = ent_water;			break;		case 5:			m_rayTypeFilter = ent_living;			break;		}	}
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:25,


示例17: ProcessEvent

	virtual void ProcessEvent( EFlowEvent event, SActivationInfo* pActInfo )	{		switch (event)		{		case eFE_Activate:			if (IsPortActive(pActInfo,IN_SEND))			{				const string &       key     = GetPortString(pActInfo,IN_MSG);				const string &       value   = GetPortString(pActInfo,IN_VALUE);				const int            iTarget = GetPortInt(pActInfo,IN_TARGET);				SNetMsgData::ETarget target  = SNetMsgData::ConvertTargetIntToEnum(iTarget);				CRY_ASSERT_MESSAGE(target != SNetMsgData::eT_Invalid, "CFlowNode_MsgSender: IN_TARGET input got converted to an invalid Enum");				if (target != SNetMsgData::eT_Invalid)				{					if (CNetMessageDistpatcher* pNetMsgDispatcher = CCryAction::GetCryAction()->GetNetMessageDispatcher())					{						NET_MSG_DISPATCHER_LOG("CFlowNode_MsgSender: %s Send message [%s/%s]", CNetMessageDistpatcher::DbgTranslateLocationToString(), key.c_str(), value.c_str());						pNetMsgDispatcher->SendMessage(SNetMsgData(CNetMessageDistpatcher::GetLocation(), target, key, value));						ActivateOutput(pActInfo, OUT_DONE, true);						return;					}				}				ActivateOutput(pActInfo, OUT_ERROR, true);			}			break;		}	}
开发者ID:joewan,项目名称:pycmake,代码行数:29,


示例18: UpdateOutputs

	void UpdateOutputs( int alertnessGlobal )	{		EFilterAI filterAI = (EFilterAI)(GetPortInt( &m_actInfo, IN_FILTERAI ));		int alertness = 0;		switch (filterAI)		{			case FAI_ALL:				alertness = alertnessGlobal;				break;			case FAI_ENEMIES:				alertness = g_pGame->GetGameAISystem()->GetAICounters().GetAlertnessCounter().GetAlertnessEnemies();				break;			case FAI_FRIENDS:				alertness = g_pGame->GetGameAISystem()->GetAICounters().GetAlertnessCounter().GetAlertnessFriends();				break;			case FAI_FACTION:			{				if (m_faction!=IFactionMap::InvalidFactionID)				{					alertness = g_pGame->GetGameAISystem()->GetAICounters().GetAlertnessCounter().GetAlertnessFaction( m_faction );				}				break;			}		}		ActivateOutput( &m_actInfo, OUT_ALERTNESS, alertness );		uint32 colorPort = clamp_tpl( alertness+OUT_GREEN, (int)OUT_GREEN, (int)OUT_RED );		ActivateOutput( &m_actInfo, colorPort, true );	}
开发者ID:PiratesAhoy,项目名称:HeartsOfOak-Core,代码行数:33,


示例19: ProcessEvent

	void ProcessEvent( EFlowEvent event, SActivationInfo *pActInfo )	{		switch (event)		{		case eFE_Initialize:			{				m_actInfo = *pActInfo;			}			break;		case eFE_Activate:			{				if(!pActInfo || !pActInfo->pEntity)					break;				if(IsPortActive(pActInfo, EIP_Trigger))				{					string teamName = GetPortString(pActInfo, EIP_TeamName);					int team = GetPortInt(pActInfo, EIP_TeamId);										if(team == 0)					{						if(!strcmp(teamName, "tan"))							team = 1;						else if(!strcmp(teamName, "black"))							team = 2;					}					g_pGame->GetGameRules()->SetTeam(team, pActInfo->pEntity->GetId()); 				}			}			break;		}	}
开发者ID:MrHankey,项目名称:destructionderby,代码行数:33,


示例20: OnIterStart

	virtual void OnIterStart(SActivationInfo *pActInfo)	{		const int type = GetPortInt(pActInfo, EIP_Type);		IEntitySystem *pEntitySystem = gEnv->pEntitySystem;		if (pEntitySystem)		{			IEntityItPtr iter = pEntitySystem->GetEntityIterator();			if (iter)			{				iter->MoveFirst();				IEntity *pEntity = NULL;				while (!iter->IsEnd())				{					pEntity = iter->Next();					if (pEntity)					{						const EntityId id = pEntity->GetId();						const EEntityType entityType = GetEntityType(id);						if (IsValidType(type, entityType))						{							AddEntity(id);						}					}				}			}		}	}
开发者ID:aronarts,项目名称:FireNET,代码行数:28,


示例21: SendNext

	bool SendNext(SActivationInfo *pActInfo)	{		bool bResult = false;		if (m_Count > 0)		{			if (m_Iter < m_Count)			{				const int limit = GetPortInt(pActInfo, EIP_Limit);				if (limit == 0 || m_Iter <= limit)				{					OnIterNext(pActInfo);					EntityId id = *m_ListIter;					ActivateOutput(pActInfo, EOP_EntityId, id);					ActivateOutput(pActInfo, EOP_Count, m_Iter);					++m_Iter;					++m_ListIter;					bResult = true;				}			}		}		if (!bResult)		{			ActivateOutput(pActInfo, EOP_Done, m_Iter);		}		return bResult;	}
开发者ID:aronarts,项目名称:FireNET,代码行数:32,


示例22: OnHUDEvent

	virtual void OnHUDEvent(const SHUDEvent& event)	{		int eventID = GetPortInt(&m_pActInfo, 0);		if(event.eventType == eventID)		{			ActivateOutput(&m_pActInfo, eOP_EventFired, 1);			for(unsigned int i = 0; i < event.GetDataSize(); i++)			{				switch(event.GetData(i).m_type)				{				case SHUDEventData::eSEDT_voidptr:					break;				case SHUDEventData::eSEDT_bool:									break;				case SHUDEventData::eSEDT_int:					break;				case SHUDEventData::eSEDT_float:						{						if(eventID == eHUDEvent_LeavingBattleArea)						{							float fDeathTimer = event.GetData(i).GetFloat();							ActivateOutput(&m_pActInfo, eOP_DeathTimer, fDeathTimer);						}					}					break;				case SHUDEventData::eSEDT_undef:				default:					CryWarning(VALIDATOR_MODULE_FLOWGRAPH, VALIDATOR_WARNING, "[CFlowNode_BattleAreaListener] HudEvent data unknown.");					break;				}			}		}	}
开发者ID:aronarts,项目名称:FireNET,代码行数:33,


示例23: ProcessEvent

    virtual void ProcessEvent( EFlowEvent event, SActivationInfo *pActInfo )    {        switch (event)        {        case eFE_Initialize:        {            bool bPaused = GetPortBool(pActInfo,IN_PAUSED);            pActInfo->pGraph->SetRegularlyUpdated( pActInfo->myID, !bPaused );            m_last = gEnv->pTimer->GetFrameStartTime();        }        break;        case eFE_Update:        {            if (GetPortBool(pActInfo,IN_PAUSED))                return;            float fPeriod = GetPortFloat(pActInfo,IN_PERIOD);            CTimeValue time = gEnv->pTimer->GetFrameStartTime();            CTimeValue dt = time - m_last;            if (dt.GetSeconds() >= fPeriod)            {                m_last = time;                int nMin = GetPortInt(pActInfo,IN_MIN);                int nMax = GetPortInt(pActInfo,IN_MAX);                m_nCurrentCount++;                if (m_nCurrentCount < nMin)                    m_nCurrentCount = nMin;                if (m_nCurrentCount > nMax)                {                    m_nCurrentCount = nMin;                }                ActivateOutput( pActInfo,OUT_OUT,m_nCurrentCount );            }        }        break;        case eFE_Activate:        {            if (IsPortActive(pActInfo,IN_PAUSED))            {                bool bPaused = GetPortBool(pActInfo,IN_PAUSED);                pActInfo->pGraph->SetRegularlyUpdated( pActInfo->myID, !bPaused );            }        }        break;        }    }
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:47,


示例24: ProcessEvent

	virtual void ProcessEvent( EFlowEvent event, SActivationInfo *pActInfo )	{		switch (event)		{		case eFE_Activate:			const int nDrawPlayer = GetPortInt(pActInfo, EIP_DrawPlayer);			if (IsPortActive(pActInfo, EIP_Link))			{				IEntity* pEntity = gEnv->pEntitySystem->GetEntity(GetPortEntityId(pActInfo, EIP_Target));				if (pEntity)				{					CActor *pPlayerActor = static_cast<CActor*>(gEnv->pGame->GetIGameFramework()->GetClientActor());					if (pPlayerActor)					{						SActorStats* pActorStats = pPlayerActor->GetActorStats();						if (pActorStats)						{							if (nDrawPlayer == -1)								pActorStats->isHidden = true;							else if (nDrawPlayer == 1)								pActorStats->isHidden = false;						}						m_Position = pEntity->GetWorldPos();						m_Rotation = pEntity->GetWorldRotation();						pPlayerActor->LinkToEntity(pEntity->GetId());						ActivateOutput(pActInfo, EOP_Linked, true);					}				}			}			if (IsPortActive(pActInfo, EIP_Unlink))			{				CActor *pPlayerActor = static_cast<CActor*>(gEnv->pGame->GetIGameFramework()->GetClientActor());				if (pPlayerActor)				{					SActorStats* pActorStats = pPlayerActor->GetActorStats();					if (pActorStats)					{						if (nDrawPlayer == -1)							pActorStats->isHidden = true;						else if (nDrawPlayer == 1)							pActorStats->isHidden = false;					}					bool keepTransform = GetPortBool(pActInfo, EIP_KeepTransform);					pPlayerActor->LinkToEntity(0, keepTransform);					if(!keepTransform)					{						pPlayerActor->GetEntity()->SetPos(m_Position);						pPlayerActor->GetEntity()->SetRotation(m_Rotation);					}					ActivateOutput(pActInfo, EOP_Unlinked, true);				}			}			break;		}	}
开发者ID:nhnam,项目名称:Seasons,代码行数:59,


示例25: ProcessEvent

        virtual void ProcessEvent( EFlowEvent event, SActivationInfo* pActInfo )        {            if ( event == eFE_Initialize )            {                m_actInfo = *pActInfo;                active = GetPortBool( pActInfo, 0 );                pActInfo->pGraph->SetRegularlyUpdated( pActInfo->myID, true );            }            if ( event == eFE_Activate )            {                active = GetPortBool( pActInfo, 0 );            }            if ( event == eFE_Update  && active )            {                int w_id = GetPortInt( pActInfo, 1 );                if ( w_id < 0 || w_id >= CryVR_WiimoteManagerPlugin::found )                {                    return ;                }                int i = 0;                wiimote** manettes =  CryVR_WiimoteManagerPlugin::GetWiimotes();                //Optimisation v0.1                wiimote_move = false;                nunchuk_move = false;                while ( wiiuse_poll( manettes, CryVR_WiimoteManagerPlugin::found ) && i < GetPortInt( pActInfo, 2 ) )                {                    if ( CryVR_WiimoteManagerPlugin::GetWiimotes( w_id )->event == WIIUSE_EVENT )                    {                        i++;                        handle_event( CryVR_WiimoteManagerPlugin::GetWiimotes( w_id ) );                    }                    else if ( CryVR_WiimoteManagerPlugin::GetWiimotes( w_id )->event == WIIUSE_NUNCHUK_INSERTED || CryVR_WiimoteManagerPlugin::GetWiimotes( w_id )->event == WIIUSE_NUNCHUK_REMOVED )                    {                        CryVR_WiimoteManagerPlugin::Status( w_id );                    }                    //Recherche d'optimisation.                    if ( nunchuk_move && wiimote_move && GetPortBool( pActInfo, 3 ) )                    {                        return ;                    }                }            }        }
开发者ID:lefevren,项目名称:Plugin_WiiDevices,代码行数:57,


示例26: GetPortString

void CFlashUIMCTemplateCreateNode::ProcessEvent( EFlowEvent event,SActivationInfo* pActInfo ){	if (event == eFE_Initialize)	{		m_TmplDescHelper.UpdateObjectDesc( GetPortString( pActInfo, eI_UIMovieClipTmpl ), pActInfo, true );		m_ParentDescHelper.UpdateObjectDesc( GetPortString( pActInfo, eI_UIParentMovieClip ), pActInfo, false );		if (GetParentDesc() && m_TmplDescHelper.GetElement() != m_ParentDescHelper.GetElement())		{			UIACTION_WARNING( "FG: Can't attach /"%s/" on parent MC /"%s/" (they must be part of the same UIElement!), referenced at node /"%s/"", GetPortString( pActInfo, eI_UIMovieClipTmpl ).c_str(), GetPortString( pActInfo, eI_UIParentMovieClip ).c_str(), pActInfo->pGraph->GetNodeTypeName( pActInfo->myID ));			m_ParentDescHelper.Reset();		}	}	else if (event == eFE_Activate)	{		if (IsPortActive( pActInfo, eI_UIMovieClipTmpl ))		{			m_TmplDescHelper.UpdateObjectDesc( GetPortString( pActInfo, eI_UIMovieClipTmpl ), pActInfo, true );		}		IUIElement* pElement = GetElement();		if (IsPortActive( pActInfo, eI_UIParentMovieClip ))		{			m_ParentDescHelper.UpdateObjectDesc( GetPortString( pActInfo, eI_UIParentMovieClip ), pActInfo, false );			if (GetParentDesc() && m_TmplDescHelper.GetElement() != m_ParentDescHelper.GetElement())			{				UIACTION_WARNING( "FG: Can't attach /"%s/" on parent MC /"%s/" (they must be part of the same UIElement!), referenced at node /"%s/"", GetPortString( pActInfo, eI_UIMovieClipTmpl ).c_str(), GetPortString( pActInfo, eI_UIParentMovieClip ).c_str(), pActInfo->pGraph->GetNodeTypeName( pActInfo->myID ));				m_ParentDescHelper.Reset();			}		}		// if m_pCurrentParen was null we also allow to pass a template name!		if (GetParentDesc() == NULL)		{			if (!m_ParentDescHelper.UpdateTmplDesc( GetPortString( pActInfo, eI_UIParentMovieClip ), pActInfo ))				return;		}		if (GetElement() && IsPortActive(pActInfo, eI_Create))		{			const int instanceId = GetPortInt( pActInfo, eI_InstanceID );			string    name       = GetPortString( pActInfo, eI_NewInstanceName );			SPerInstanceCall3< const SUIMovieClipDesc*, const SUIMovieClipDesc*, string & > caller;			if (!caller.Execute(GetElement(), instanceId, functor(*this, &CFlashUIMCTemplateCreateNode::CreateMoviclip), GetTemplateDesc(), GetParentDesc(), name, false))			{				UIACTION_WARNING( "FG: UIElement /"%s/" called get CreateMovieClip for multiple instances! (passed instanceId %i), referenced at node /"%s/"", GetElement()->GetName(),instanceId, pActInfo->pGraph->GetNodeTypeName( pActInfo->myID ));			}			ActivateOutput( pActInfo, eO_InstanceName, name );			ActivateOutput( pActInfo, eO_OnCreate, true );		}	}}
开发者ID:joewan,项目名称:pycmake,代码行数:57,



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


C++ GetPortString函数代码示例
C++ GetPortBool函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。