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; }
void CEditWidget::GetController(QDomLiteElement* data) { int Controller; int Value; GetController(Controller,Value); data->setAttribute("Controller",Controller); data->setAttribute("Value",Value); }
// @TODO: DEPRECATED, remove. void ADefaultPawn::Turn(float Val) { APlayerController* PC = Cast<APlayerController>(GetController()); if (PC) { PC->AddYawInput(Val); } }
// @TODO: DEPRECATED, remove. void ADefaultPawn::LookUp(float Val) { APlayerController* PC = Cast<APlayerController>(GetController()); if (PC) { PC->AddPitchInput(Val); } }
void AVehiclePawn::OnTrackPointReached(class AVehicleTrackPoint* NewCheckpoint) { AVehiclePlayerController* MyPC = Cast<AVehiclePlayerController>(GetController()); if (MyPC) { MyPC->OnTrackPointReached(NewCheckpoint); } }
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(); }
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; } } } }
void AHair::SetSelectedQuality(float InVal) { AMyPlayerController* Controller = GetController(); for (int i = 0; i < Controller->TargetSegments.Num(); i++) { Controller->TargetSegments[i]->NumSegments = InVal; } }
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 ); } }
void AHair::SetSelectedSegmentFallOff(float InVal) { AMyPlayerController* Controller = GetController(); for (int i = 0; i < Controller->TargetSegments.Num(); i++) { Controller->TargetSegments[i]->FallOff = InVal; } }
void AHair::DeselectSegment(AHairSegment* Segment) { AMyPlayerController* Controller = GetController(); if (!Controller) return; Segment->OutlineMesh->SetRenderCustomDepth(false); Controller->TargetSegments.Remove(Segment); SetNodeVisibility(Segment, false); }
void AHair::SelectNode(AHairNode* Node) { AMyPlayerController* Controller = GetController(); if (!Controller) return; Controller->TargetNodes.Add(Node); Node->StaticMesh->SetRenderCustomDepth(true); }
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, ...); }
APlayerController* UBerserkCameraComponent::GetPlayerController() { APlayerController* playerController = nullptr; auto ownerPawn = GetOwnerPawn(); if (ownerPawn != nullptr) playerController = Cast<APlayerController>(ownerPawn->GetController()); return playerController; }
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; }
void AOverseer::ShowMouse() { APlayerController* PlayerController = Cast<APlayerController>(GetController()); if (PlayerController){ PlayerController->bEnableClickEvents = true; PlayerController->bShowMouseCursor = true; PlayerController->bEnableMouseOverEvents = true; } }
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, ...); }
func ControlThrow(object caller) { if(DenyContainedDirectCom()) { return false; } SendObjectThroughTube(); return ClearLastPlrCom(GetController(caller)) || true; }
void AHair::SelectSegment(AHairSegment* Segment) { AMyPlayerController* Controller = GetController(); if (!Controller) return; Controller->TargetSegments.Add(Segment); Segment->OutlineMesh->SetRenderCustomDepth(true); SetNodeVisibility(Segment, true); }
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; }
void AKappaPawn::BeginPlay() { APlayerController* const P1 = Cast<APlayerController>(GetController()); if (P1 != nullptr) { P1->bShowMouseCursor = true; P1->bEnableClickEvents = true; } }
void AVehiclePawn::OnHandbrakePressed() { AVehiclePlayerController *VehicleController = Cast<AVehiclePlayerController>(GetController()); UWheeledVehicleMovementComponent *VehicleMovement = GetVehicleMovementComponent(); if (VehicleMovement != NULL) { VehicleMovement->SetHandbrakeInput(true); } }
// 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); } }
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); }
void U2Node::UpdateRenderContext(U2RenderContext* pRCxt) { for(unsigned int i=0; i < GetNumControllers(); ++i) { if(!GetController(i)->IsInitialize()) GetController(i)->Initialize(pRCxt); GetController(i)->Update(0.f, pRCxt); } unsigned childIdx; for(childIdx = 0; childIdx < m_childArray.FilledSize(); ++childIdx) { if(NULL != m_childArray[childIdx]) { m_childArray[childIdx]->UpdateRenderContext(pRCxt); } } }
void DiTextureRotatorControllerObj::InitPropertyTable() { DiControllerBaseObj::InitPropertyTable(); DiPropertyGroup* g = DI_NEW DiPropertyGroup("Texture Rotator Controller"); g->AddProperty("Own Speed" , DI_NEW DiBoolProperty([&]{ return GetController()->UseOwnRotationSpeed(); }, [&](bool& val){ GetController()->SetUseOwnRotationSpeed(val); })); g->AddProperty("Rotation" , DI_NEW DiDynProperty( [&]{ return GetController()->GetRotation(); }, [&](DiDynamicAttribute*& val){ GetController()->SetRotation(val); })); g->AddProperty("Rotation Speed" , DI_NEW DiDynProperty( [&]{ return GetController()->GetRotationSpeed(); }, [&](DiDynamicAttribute*& val){ GetController()->SetRotationSpeed(val); })); g->CreateUI(); mPropGroups.push_back(g); }
// Called when seeing a pawn void APreyCharacter::OnSeePawn(APawn* Pawn) { APreyAIController* PreyAIController = Cast<APreyAIController>(GetController()); AHunterCharacter* HunterCharacter = Cast<AHunterCharacter>(Pawn); if (PreyAIController && HunterCharacter) { PreyAIController->SetHunterLocation(Pawn); } }
void AVehiclePawn::MoveRight(float Val) { AVehiclePlayerController* MyPC = Cast<AVehiclePlayerController>(GetController()); UWheeledVehicleMovementComponent *VehicleMovement = GetVehicleMovementComponent(); if (VehicleMovement == NULL || (MyPC && MyPC->IsHandbrakeForced())) { return; } VehicleMovement->SetSteeringInput(Val); }
void ADA2UE4Creature::OnHearNoise(APawn* Pawn, const FVector& Location, float Volume) { LastSensedTime = GetWorld()->GetTimeSeconds(); ADA2UE4CreatureController* AIController = Cast<ADA2UE4CreatureController>(GetController()); if (AIController) { AIController->SetActionTarget(Pawn); } }
void ASZombieCharacter::SetBotType(EBotBehaviorType NewType) { BotType = NewType; ASZombieAIController* AIController = Cast<ASZombieAIController>(GetController()); if (AIController) { AIController->SetBlackboardBotType(NewType); } }