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

C++ GetController函数代码示例

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

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



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

示例1: SendMilestone

SafeTrajClient::MotionResult CommandInterface::SendMilestone(const Config& x)
{
  if(sim) GetController(sim->robotControllers[0])->AddMilestone(x);
  else if(val3) {
    return val3->MoveTo(x);
  }
  return SafeTrajClient::Success;
}
开发者ID:bbgw,项目名称:RobotSim,代码行数:8,代码来源:userinterface.cpp


示例2: GetController

void CEditWidget::GetController(QDomLiteElement* data)
{
    int Controller;
    int Value;
    GetController(Controller,Value);
    data->setAttribute("Controller",Controller);
    data->setAttribute("Value",Value);
}
开发者ID:vemod-,项目名称:ObjectComposerXML,代码行数:8,代码来源:ceditwidget.cpp


示例3: Turn

// @TODO: DEPRECATED, remove.
void ADefaultPawn::Turn(float Val)
{
	APlayerController* PC = Cast<APlayerController>(GetController());
	if (PC)
	{
		PC->AddYawInput(Val);
	}
}
开发者ID:kidaa,项目名称:UnrealEngineVR,代码行数:9,代码来源:DefaultPawn.cpp


示例4: LookUp

// @TODO: DEPRECATED, remove.
void ADefaultPawn::LookUp(float Val)
{
	APlayerController* PC = Cast<APlayerController>(GetController());
	if (PC)
	{
		PC->AddPitchInput(Val);
	}
}
开发者ID:colwalder,项目名称:unrealengine,代码行数:9,代码来源:DefaultPawn.cpp


示例5: OnTrackPointReached

void AVehiclePawn::OnTrackPointReached(class AVehicleTrackPoint* NewCheckpoint)
{
	AVehiclePlayerController* MyPC = Cast<AVehiclePlayerController>(GetController());
	if (MyPC)
	{
		MyPC->OnTrackPointReached(NewCheckpoint);
	}
}
开发者ID:WesMC,项目名称:UnrealVehicleExampleNetworked,代码行数:8,代码来源:VehiclePawn.cpp


示例6: PossessedBy

void AARCharacter::PossessedBy(class AController* NewController)
{
	Super::PossessedBy(NewController);
	Equipment->TargetCharacter = this;
	Equipment->TargetController = Cast<AARPlayerController>(GetController());
	if (Equipment->TargetController)
	{
		Equipment->Inventory = Equipment->TargetController->Inventory;
	}
	Abilities->OwningCharacter = this;
	Abilities->OwningController = Cast<AARPlayerController>(GetController());

	Attributes->PlayerController = Cast<AARPlayerController>(GetController());
	Attributes->PlayerCharacter = this;

	Attributes->Initialize();
}
开发者ID:Aboutdept,项目名称:ActionRPGGame,代码行数:17,代码来源:ARCharacter.cpp


示例7: GetOtherCharacterInfo

void AMMO_Character::GetOtherCharacterInfo()
{
	// Feed Party stuff to your UI
	if (Role < ROLE_Authority)
	{
		if (GetController() && OtherCharacter)
		{
			if (Cast<AMMO_Player_Controller>(GetController()))
			{
				Cast<AMMO_Player_Controller>(GetController())->MainHUD->OtherCharName = OtherCharacter->CharacterName;

				if (OtherCharacter->MaxHealth != 0)
					Cast<AMMO_Player_Controller>(GetController())->MainHUD->OtherHPBarVal = OtherCharacter->CurrentHealth / OtherCharacter->MaxHealth;
			}
		}
	}
}
开发者ID:DigitalDok,项目名称:MyPortfolioSnippets,代码行数:17,代码来源:MMO_Character.cpp


示例8: GetController

void AHair::SetSelectedQuality(float InVal)
{
	AMyPlayerController* Controller = GetController();
	for (int i = 0; i < Controller->TargetSegments.Num(); i++)
	{
		Controller->TargetSegments[i]->NumSegments = InVal;
	}
}
开发者ID:ArchDD,项目名称:Archs-HairyLab-UE4,代码行数:8,代码来源:Hair.cpp


示例9: GetController

void GActionDie::Update(float fTime)
{
	Gn2DSequence* sequence = GetController()->GetActor()->GetCurrentSequence();
	//GnAssert( sequence->IsLoop() == false );
	if( sequence && sequence->IsStop() )
	{
		mAcumTime += fTime;
		gint alpha = 255 - ( (mAcumTime / mAlphaTime) * 255 );
		if( alpha <= 0 )
		{
			GetController()->SetIsDestory( true );
			return;
		}
		Gn2DMeshObject* mesh = GetController()->GetMesh();
		mesh->SetAlpha( (guchar)alpha );
	}
}
开发者ID:daoopp,项目名称:WebGame,代码行数:17,代码来源:GActionDie.cpp


示例10: NOFF_BlastObject

global func NOFF_BlastObject(int level, int caused_by, ...)
{
	var w_controller = caused_by;
	var t_controller = GetController();
	if (w_controller >= 0) // NO_OWNER is probably lost controller management (e.g. chain reactions). Always hit.
		if ((t_controller == ENEMY) == (w_controller == ENEMY)) // ENEMY can't hit ENEMY and others can't hit others.
			return true; // reject
	return this->NOFF_backup_bo(level, caused_by, ...);
}
开发者ID:TheBlackJokerDevil,项目名称:openclonk,代码行数:9,代码来源:NoFriendlyFire_Clonk.c


示例11: GetOwnerPawn

APlayerController* UBerserkCameraComponent::GetPlayerController()
{
	APlayerController* playerController = nullptr;
	auto ownerPawn = GetOwnerPawn();
	if (ownerPawn != nullptr)
		playerController = Cast<APlayerController>(ownerPawn->GetController());

	return playerController;
}
开发者ID:Elringus,项目名称:UeRtsCamera,代码行数:9,代码来源:BerserkCameraComponent.cpp


示例12: FString

void AProtherer::MoveOrc()
{
	this->sayDialog(&((new FString("Responding to transportation type: "))->Append(*(TransportUsed.Last(0)))));
	this->CurrentLocation = GetNextWaypoint();
	

	UNavigationSystem::SimpleMoveToLocation(GetController(), this->CurrentLocation->GetActorLocation());
	this->IsMoving = true;
}
开发者ID:krishnasHub,项目名称:Game-AI,代码行数:9,代码来源:Protherer.cpp


示例13: ShowMouse

void AOverseer::ShowMouse()
{
    APlayerController* PlayerController = Cast<APlayerController>(GetController());
    if (PlayerController){
        PlayerController->bEnableClickEvents = true;
        PlayerController->bShowMouseCursor = true;
        PlayerController->bEnableMouseOverEvents = true;
    }
}
开发者ID:mcseyyy,项目名称:ParallaxTD,代码行数:9,代码来源:Overseer.cpp


示例14: NOFF_DoShockwaveCheck

global func NOFF_DoShockwaveCheck(int x, int y, int caused_by, ...)
{
	var w_controller = caused_by;
	var t_controller = GetController();
	if (w_controller >= 0) // NO_OWNER is probably lost controller management (e.g. chain reactions). Always hit.
		if ((t_controller == ENEMY) == (w_controller == ENEMY)) // ENEMY can't hit ENEMY and others can't hit others.
			return false; // reject
	return this->NOFF_backup_sw(x, y, caused_by, ...);
}
开发者ID:TheBlackJokerDevil,项目名称:openclonk,代码行数:9,代码来源:NoFriendlyFire_Clonk.c


示例15: ControlThrow

func ControlThrow(object caller)
{
	if(DenyContainedDirectCom())
	{
		return false;
	}
	SendObjectThroughTube();
	return ClearLastPlrCom(GetController(caller)) || true;
}
开发者ID:Fulgen301,项目名称:SGGP,代码行数:9,代码来源:Script.c


示例16: SendMilestoneImmediate

SafeTrajClient::MotionResult CommandInterface::SendMilestoneImmediate(const Config& x)
{
  if(sim) GetController(sim->robotControllers[0])->SetMilestone(x);
  else if(val3) {
    double delay = Max(minimumLatency,val3->client.GetAverageLatency()*resetLatencyMultiplier);
    return val3->MoveToImmediate(delay,x);
  }
  return SafeTrajClient::Success;
}
开发者ID:bbgw,项目名称:RobotSim,代码行数:9,代码来源:userinterface.cpp


示例17: BeginPlay

void AKappaPawn::BeginPlay()
{
    APlayerController* const P1 = Cast<APlayerController>(GetController());
    if (P1 != nullptr)
    {
        P1->bShowMouseCursor = true;
        P1->bEnableClickEvents = true;
    }
}
开发者ID:RobertMic,项目名称:TestRepo,代码行数:9,代码来源:KappaPawn.cpp


示例18: OnHandbrakePressed

void AVehiclePawn::OnHandbrakePressed()
{
	AVehiclePlayerController *VehicleController = Cast<AVehiclePlayerController>(GetController());
	UWheeledVehicleMovementComponent *VehicleMovement = GetVehicleMovementComponent();
	if (VehicleMovement != NULL)
	{
		VehicleMovement->SetHandbrakeInput(true);
	}
}
开发者ID:WesMC,项目名称:UnrealVehicleExampleNetworked,代码行数:9,代码来源:VehiclePawn.cpp


示例19: OnHearNoise

// Called when hearing noise
void APreyCharacter::OnHearNoise(APawn* PawnInstigator, const FVector& Location, float Volume)
{
	APreyAIController* PreyAIController = Cast<APreyAIController>(GetController());

	if (PreyAIController && PawnInstigator != this)
	{
		PreyAIController->SetNoiseLocation(Location);
	}
}
开发者ID:dingjun,项目名称:RunForLife,代码行数:10,代码来源:PreyCharacter.cpp


示例20: GameUpdateAndRender

internal void GameUpdateAndRender(game_memory *Memory, game_input *Input,
                                  game_offscreen_buffer *Buffer)
{
  Assert(sizeof(game_state) <= Memory->PermanentStorageSize);
  game_state *GameState = (game_state *) Memory->PermanentStorage;

  if (!Memory->IsInitialized)
  {
    char *Filename = __FILE__;
    debug_read_file_result File = DEBUGPlatformReadEntireFile(Filename);

    if (File.Contents)
    {
      DEBUGPlatformWriteEntireFile("test.out", File.ContentsSize, File.Contents);
      DEBUGPlatformFreeFileMemory(File.Contents);
    }

    GameState->ToneHz = 512;

    Memory->IsInitialized = true;
  }

  for (int ControllerIndex = 0; ControllerIndex < ArrayCount(Input->Controllers); ++ControllerIndex)
  {
    game_controller_input *Controller = GetController(Input, ControllerIndex);

    if (Controller->IsAnalog)
    {
      // Use analog movement tuning.
      GameState->BlueOffset += (int) (4.0f * Controller->StickAverageX);
      GameState->ToneHz = 512 + (int) (128.0f * Controller->StickAverageY);
    }
    else
    {
      // Use digital movement tuning.
      if (Controller->MoveLeft.EndedDown)
      {
        GameState->BlueOffset -= 1;
      }

      if (Controller->MoveRight.EndedDown)
      {
        GameState->BlueOffset += 1;
      }
    }

    // Input.AButtonEndedDown;
    // Input.AButtonHalfTransitionCount;
    if (Controller->ActionDown.EndedDown)
    {
      GameState->GreenOffset += 1;
    }
  }

  RenderWeirdGradient(Buffer, GameState->BlueOffset, GameState->GreenOffset);
}
开发者ID:chris-horner,项目名称:HandmadeHero,代码行数:56,代码来源:handmade.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ GetCount函数代码示例发布时间:2022-05-30
下一篇:
C++ GetControl函数代码示例发布时间: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