//------------------------------------------------------------------------
void CReplayActor::SetupActionController(const char *controllerDef, const char *animDB1P, const char *animDB3P)
{
	IMannequin &mannequinSys = gEnv->pGame->GetIGameFramework()->GetMannequinInterface();
	const SControllerDef *pContDef = NULL;
	if (controllerDef)
	{
		pContDef = mannequinSys.GetAnimationDatabaseManager().LoadControllerDef(controllerDef);
	}
	if (animDB1P)
	{
		m_pAnimDatabase1P = mannequinSys.GetAnimationDatabaseManager().Load(animDB1P);
	}
	if (animDB3P)
	{
		m_pAnimDatabase3P = mannequinSys.GetAnimationDatabaseManager().Load(animDB3P);
	}

	if (pContDef)
	{
		SAFE_RELEASE(m_pActionController);
		SAFE_DELETE(m_pAnimContext);

		m_pAnimContext = new SAnimationContext(*pContDef);
		m_pActionController = mannequinSys.CreateActionController(GetEntity(), *m_pAnimContext);

		UpdateCharacter();
	}
}
Beispiel #2
0
GameSocket::~GameSocket()
{
    if(Player.Flags.Ingame)
    {
        DespawnMe();									// Tell other players that we're gone.
        UpdateCharacter();								// Save changes to DB
        Objects.Players.erase(Player.General.UniqueID);	// Delete our map.
    }
}
void ADefyingGravityCharacter::Tick(float DeltaSeconds)
{
	Super::Tick(DeltaSeconds);
	
	if (bActive) {

		UpdateCharacter();
		// Get all overlapping Actors and store them in an array
		TArray<AActor*> CollectedActors;
		CollectionSphere->GetOverlappingActors(CollectedActors);
		// for each Actor we collected
		for (int32 iCollected = 0; iCollected < CollectedActors.Num(); ++iCollected)
		{
			// Cast the actor to ADefyingGravityEndingStageDoor
			ADefyingGravityEndingStageDoor* const testDoor = Cast<ADefyingGravityEndingStageDoor>(CollectedActors[iCollected]);
			// if the cast is successful and the Door is valid and active
			if (testDoor && testDoor->isActive())
			{
				testDoor->endStage();
			}
		}



		FVector Located = GetActorLocation();

		if (isChangingMap()) {

			// check what map we're going to change to play
			if (isPast()) {

				//origin of past map
				FVector pastMap = FVector(Located.X, 0.0f, 5150.0f); // Z up to the ground
				SetActorLocation(pastMap, false, nullptr, ETeleportType::None);

			}
			else {
				FVector Located = GetActorLocation();
				// origin of default map
				FVector defMap = FVector(Located.X, 0.0f, 150.0f);
				SetActorLocation(defMap, false, nullptr, ETeleportType::None);


			}
			setbChangeMap(false);
		}

		if (isPast()) {
			power = power - decayrate;
		}
	}

	
}
Beispiel #4
0
XSceneTrader::XSceneTrader(XGame *pGame)
	: XSceneBase(pGame, XGAME::xSC_TRADER)
	, m_Layout(_T("layout_trader.xml"))
{
	XBREAK(SCENE_TRADER != NULL);
	SCENE_TRADER = this;
	Init();

	// 초기값

	for (int i = 0; i < XGAME::xRES_MAX; i++)
		m_resourceGold[i] = 0;

	m_totalGold = 0;

	UILoad();				// 초기 UI 로드
	UpdateCharacter();		// 현재 무역상이 있는지 확인
#ifdef _VER_ANDROID
	JniHelper::ShowAdmob( true, 480, 51 );
#endif // _VER_ANDROID
}
//------------------------------------------------------------------------
void CReplayActor::SetFirstPerson(bool firstperson)
{
	m_animationProxy.SetFirstPerson(firstperson);
	m_animationProxyUpper.SetFirstPerson(firstperson);
	if (firstperson)
	{
		m_flags |= eRAF_FirstPerson;
	}
	else
	{
		m_flags &= ~eRAF_FirstPerson;
	}

	CItem *pItem = static_cast<CItem*>(g_pGame->GetIGameFramework()->GetIItemSystem()->GetItem(m_gunId));
	if (pItem)
	{
		pItem->CheckViewChange();
	}

	UpdateCharacter();
	UpdateScopeContexts();
}
void CharacterControl::UpdateObject(FreeMovingGameObject* pCharacter)
{
  UpdateCharacter(pCharacter, CharacterControl::s_stepHeight); 
}
void ASimonSaysCharacter::Tick(float DeltaSeconds)
{
    Super::Tick(DeltaSeconds);
    
    UpdateCharacter();
}
void AGameJamGameCharacter::Tick(float DeltaSeconds)
{
	Super::Tick(DeltaSeconds);
	
	UpdateCharacter();	
}
Beispiel #9
0
void XSceneTrader::Update()
{
	XGAME::CreateUpdateTopResource( this );
	UpdateCharacter();
	XSceneBase::Update();
}
void ATP_2DSideScrollerCharacter::Tick(float DeltaSeconds)
{
	Super::Tick(DeltaSeconds);
	
	UpdateCharacter();	
}
void AMyProject3Character::Tick(float DeltaSeconds)
{
	Super::Tick(DeltaSeconds);
	
	UpdateCharacter();	
}
void CReplayActor::LoadCharacter(const char *filename)
{
	GetEntity()->LoadCharacter(0, filename);

	UpdateCharacter();
}
Beispiel #13
0
void AOutsiderCharacter::Tick(float DeltaSeconds)
{
	Super::Tick(DeltaSeconds);
	
	UpdateCharacter();	
}
void ASpherobotCharacter::Tick(float DeltaSeconds)
{
	Super::Tick(DeltaSeconds);
	
	UpdateCharacter();	
}