Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

MobileGame.CastlePC

Extends
MobilePC

Copyright 1998-2011 Epic Games, Inc. All Rights Reserved.

Core.Object
|   
+-- Engine.Actor
   |   
   +-- Engine.Controller
      |   
      +-- Engine.PlayerController
         |   
         +-- GameFramework.GamePlayerController
            |   
            +-- MobileGame.MobilePC
               |   
               +-- MobileGame.CastlePC

Variables Summary
floatAutoAttractTime
boolbAutoSlide
boolbDoneInitialFade
boolbIsInAttractMode
boolbPauseMenuOpen
boolbSplashHasBeenShown
boolbSuppressSplash
SoundCueCloseMenuSound
MobileMenuDebugDebugMenu
SoundCueInvalidTapToMoveSound
floatLastDistToDestination
SoundCueOpenMenuSound
MobileMenuPausePauseMenu
floatSliderEnd
floatSliderStart
floatSliderTravelDuration
floatSliderTravelTime
floatStuckThreshHold
floatTapToMoveAutoPitchAmount
vectorTapToMoveDestination
SoundCueTapToMoveSound
SoundCueTapToMoveStopSound
KActorSpawnableTapToMoveVisualActor
floatTapToMoveVisualAnimDuration
floatTapToMoveVisualEffectEndTime
floatTapToMoveVisualEffectStartTime
StaticMeshTapToMoveVisualMesh
floatTapToMoveVisualMinDist
floatTapToMoveVisualRotateSpeed
MobileMenuControlsTutMenu
MobileInputzoneTutorialLookZone
ETutorialStageTutorialStage
vector2DViewportSize
Inherited Variables from MobileGame.MobilePC
AutoRotationAccelRate, AutoRotationBrakeDecelRate, AutoRotationVelocity, bApplyBackTouchToViewOffset, bCameraBreathing, bFingerIsDown, bLookAtDestination, BreathAutoRotationAccelRate, BreathAutoRotationBrakeDecelRate, bSmoothRotation, CameraBreathCenterLocation, CameraBreathRotator, CameraBreathSampleLocation, DefaultInputGroup, DistanceUntilNextFootstepSound, FacebookZone, FootstepSounds, FreeLookZone, LastCameraBreathDeltaSelectTime, LastEnteredTapToMove, LastOffset, LookAtDestAutoPitchAmount, LookAtDestination, MatineeOffset, MaxAutoRotationVelocity, MaxBreathAutoRotationVelocity, MPI, NoTapToMoves, OldLookup, OldTurn, RangeBasedAccelMaxDistance, RangeBasedYawAccelStrength, RotationSmoothingFactor, ServerCommandline, SliderZone, StickLookZone, StickMoveZone, TimeBetweenCameraBreathChanges, TimeOfLastUserViewChange, TotalTimeInTapToMove, TouchCenter
Inherited Variables from GameFramework.GamePlayerController
AgentAwareRadius, bDebugCrowdAwareness, bIsWarmupPaused, bWarnCrowdMembers, CurrentSoundMode

Enumerations Summary
ETutorialStage
ETS_None, ETS_Tap, ETS_Swipe, ETS_Sticks, ETS_Done,

Functions Summary
function AutoSlide (float Destination))
event BeginState (Name PreviousStateName))
PlayerTapToMove
function CheckDistanceToDestination (float DistToDestination))
event CheckIfStuck ()))
PlayerTapToMove
function CheckInactivity ()))
event Destroyed ()))
function DoTapToMove (vector NewDestination, bool bShouldLookAtDestination ))
event EndState (Name NextStateName))
PlayerTapToMove
function EnterAttractMode ()))
function ExitAttractMode ()))
functionbool ExitAttractTap (MobileInputZone Zone, EZoneTouchEvent EventType, Vector2D TouchLocation))
function FlashHelp (float Duration))
functionbool MenuSliderTap (MobileInputZone Zone, EZoneTouchEvent EventType, Vector2D TouchLocation))
event NotifyDirectorControl (bool bNowControlling))
event OnEngineInitialTick ()))
function OpenMenu ()))
function PlayerLookAtDestination ()))
function PlayerTick (float DeltaTime))
function PlayerTick (float DeltaTime))
PlayerTapToMove
function PostBeginPlay ()))
functionbool ProcessMenuSlide (MobileInputZone Zone, EZoneTouchEvent EventType, int SlideValue, Vector2D ViewportSizes))
function ProcessViewRotation (float DeltaTime, out Rotator out_ViewRotation, Rotator DeltaRot ))
function ResetMenu ()))
function SaveControllerStats ()))
function SetupZones ()))
function ShowSplash ()))
function StartTutorials ()))
functionbool TapToMoveTap (MobileInputZone Zone, EZoneTouchEvent EventType, Vector2D TouchLocation))
functionActor TraceForTapToMove (Pawn TraceOwner, out vector HitLocation, out vector HitNormal, vector End, vector Start))
Inherited Functions from MobileGame.MobilePC
ActivateControlGroup, CheckDistanceToDestination, Destroyed, FacebookButtonClicked, GetPlayerViewPoint, InitInputSystem, IsStickMoveActive, NotifyDirectorControl, OffsetMatineeTouch, OnConsoleCommand, OnFBAuthComplete, OnFBRequestComplete, OnUserClickedAdvertisement, OnUserClosedAdvertisement, OnWebRequestComplete, PlayerMove, PlayerTick, PostBeginPlay, ProcessViewRotation, ReceivedGameClass, SetFootstepsToSnow, SetFootstepsToStone, SetNextFootstepDistance, SetupZones, UpdateCameraBreathing, UpdateRotation
Inherited Functions from GameFramework.GamePlayerController
CallMemLeakCheck, CanUnpauseWarmup, ClientColorFade, ClientPlayMovie, ClientStopMovie, CrowdDebug, CrowdFocus, CrowdToggle, DoForceFeedbackForScreenShake, DoMemLeakChecking, GetCurrentMovie, GetUIPlayerIndex, KeepPlayingLoadingMovie, NotifyCrowdAgentInRadius, NotifyCrowdAgentRefresh, SetSoundMode, ShowLoadingMovie, StopMemLeakChecking, WarmupPause

States Summary
PlayerTapToMove Source code
state PlayerTapToMove
/** * Tap to Move requires it's own special state for the player controller */
BeginState, CheckIfStuck, EndState, PlayerTick


Variables Detail

AutoAttractTime Source code

var float AutoAttractTime;

bAutoSlide Source code

var bool bAutoSlide;

bDoneInitialFade Source code

var bool bDoneInitialFade;
Have we triggered the initial fading out of the Controls Help Menu

bIsInAttractMode Source code

var bool bIsInAttractMode;
If True then we are in attract mode

bPauseMenuOpen Source code

var bool bPauseMenuOpen;

bSplashHasBeenShown Source code

var bool bSplashHasBeenShown;
will be true once the splash screen has been shown

bSuppressSplash Source code

var config bool bSuppressSplash;
Set to true to suppress the splash screen

CloseMenuSound Source code

var SoundCue CloseMenuSound;

DebugMenu Source code

var MobileMenuDebug DebugMenu;

InvalidTapToMoveSound Source code

var SoundCue InvalidTapToMoveSound;

LastDistToDestination Source code

var float LastDistToDestination;
We use this to see if we are stuck

OpenMenuSound Source code

var SoundCue OpenMenuSound;

PauseMenu Source code

var MobileMenuPause PauseMenu;

SliderEnd Source code

var float SliderEnd;

SliderStart Source code

var float SliderStart;

SliderTravelDuration Source code

var float SliderTravelDuration;

SliderTravelTime Source code

var float SliderTravelTime;

StuckThreshHold Source code

var float StuckThreshHold;
How far the player must have moved within the last 0.5 seconds before we consider them 'stuck' and

TapToMoveAutoPitchAmount Source code

var float TapToMoveAutoPitchAmount;
Scalar that sets how much the camera should pitch up and down to match the tap-to-move target

TapToMoveDestination Source code

var vector TapToMoveDestination;
Holds the destination we are moving towards

TapToMoveSound Source code

var SoundCue TapToMoveSound;

TapToMoveStopSound Source code

var SoundCue TapToMoveStopSound;

TapToMoveVisualActor Source code

var KActorSpawnable TapToMoveVisualActor;
Spawned actor for 'tap to move' visual cue

TapToMoveVisualAnimDuration Source code

var float TapToMoveVisualAnimDuration;
Length of visual cue animation effect

TapToMoveVisualEffectEndTime Source code

var float TapToMoveVisualEffectEndTime;
Time that tap to move visual effect ended

TapToMoveVisualEffectStartTime Source code

var float TapToMoveVisualEffectStartTime;
Time that tap to move visual effect started

TapToMoveVisualMesh Source code

var StaticMesh TapToMoveVisualMesh;
Mesh to use for 'tap to move' visual cue in the world

TapToMoveVisualMinDist Source code

var float TapToMoveVisualMinDist;
Minimum distance from destination before visual cue will vanish

TapToMoveVisualRotateSpeed Source code

var float TapToMoveVisualRotateSpeed;
How fast the visual cue should rotate every frame

TutMenu Source code

var MobileMenuControls TutMenu;

TutorialLookZone Source code

var MobileInputzone TutorialLookZone;
Cached reference to the Tutorial Look Zone

TutorialStage Source code

var ETutorialStage TutorialStage;

ViewportSize Source code

var vector2D ViewportSize;
Holds the dims of the viewport


Enumerations Detail

ETutorialStage Source code

enum ETutorialStage
{
ETS_None, ETS_Tap, ETS_Swipe, ETS_Sticks, ETS_Done,
};
Tutorial


Functions Detail

AutoSlide Source code

function AutoSlide ( float Destination) )
Automatically slide to a new location

BeginState PlayerTapToMove Source code

event BeginState ( Name PreviousStateName) )
Setup the auto-rotate towards the destination

CheckDistanceToDestination Source code

simulated function CheckDistanceToDestination ( float DistToDestination) )
If we're very close to the target, then go ahead and hide the visual cue

CheckIfStuck PlayerTapToMove Source code

event CheckIfStuck ( ) )
Check to see if the player is stuck. This is called every 1/2 second. It just looks to see if you have most past a threshold since the last check and if not, considers you stuck. We also use this event to determine if enough time has passed that we should start auto-rotating again

CheckInactivity Source code

function CheckInactivity ( ) )
Every second, we look at various metrics to see if the player has been active. If they haven't been, then we want switch to attract mode

Destroyed Source code

event Destroyed ( ) )
Make sure we destory the visual tap actor

DoTapToMove Source code

function DoTapToMove ( vector NewDestination, bool bShouldLookAtDestination ) )
The player has clicked on a spot. Start the move
@param NewDestination Where do we want to move to
@param bShouldLookAtDestination True if we should also automatically look toward the destination

EndState PlayerTapToMove Source code

event EndState ( Name NextStateName) )
Close everything down.

EnterAttractMode Source code

exec function EnterAttractMode ( ) )
Enter attrack mode. We need to make sure we kill any active menus/etc.

ExitAttractMode Source code

exec function ExitAttractMode ( ) )
Leave attract mode

ExitAttractTap Source code

function bool ExitAttractTap ( MobileInputZone Zone, EZoneTouchEvent EventType, Vector2D TouchLocation) )
Delegate that gets called when the exit attact mode button is tapped

FlashHelp Source code

exec function FlashHelp ( float Duration) )
Display the control help on the screen

MenuSliderTap Source code

function bool MenuSliderTap ( MobileInputZone Zone, EZoneTouchEvent EventType, Vector2D TouchLocation) )
Depending on the state of the pause menu, a tap on it's nub will either auto-open or auto-close it. This delegate manages the tap.

NotifyDirectorControl Source code

event NotifyDirectorControl ( bool bNowControlling) )
notification when a matinee director track starts or stops controlling the ViewTarget of this PlayerController
@param bNowControlling will be true if we are back in control

OnEngineInitialTick Source code

event OnEngineInitialTick ( ) )
An event that is called after the first tick of GEngine. We are going to hijack this for initialization purposes.

OpenMenu Source code

function OpenMenu ( ) )
Force the Pause Menu to open

PlayerLookAtDestination Source code

function PlayerLookAtDestination ( ) )
Initialize the look at system to point to the destination.

PlayerTick Source code

function PlayerTick ( float DeltaTime) )
Handle any animations and time criticl code

PlayerTick PlayerTapToMove Source code

function PlayerTick ( float DeltaTime) )
Each frame, look to see if the player has decided to use the virtual stick to move. If they have, we want to abort tap to move.

PostBeginPlay Source code

simulated function PostBeginPlay ( ) )
Setup the in world indicator for tap to move and some other subsystems

ProcessMenuSlide Source code

function bool ProcessMenuSlide ( MobileInputZone Zone, EZoneTouchEvent EventType, int SlideValue, Vector2D ViewportSizes) )
When you touch and drag on the nub, this code determines what to do.

ProcessViewRotation Source code

function ProcessViewRotation ( float DeltaTime, out Rotator out_ViewRotation, Rotator DeltaRot ) )
Called from PlayerMove, it's here that we adjust the viewport

ResetMenu Source code

function ResetMenu ( ) )
Reset the pause menu

SaveControllerStats Source code

function SaveControllerStats ( ) )
Saves out the controller stats for processing

SetupZones Source code

function SetupZones ( ) )
The main purpose of this function is to size and reset zones. There's a lot of specific code in here to reposition zones based on if it's an phone vs pad.

ShowSplash Source code

exec function ShowSplash ( ) )
Show the splash screen

StartTutorials Source code

function StartTutorials ( ) )
Start the tutorials

TapToMoveTap Source code

function bool TapToMoveTap ( MobileInputZone Zone, EZoneTouchEvent EventType, Vector2D TouchLocation) )
This is our event handler for taps.
@param Zone The Zone we are managing
@param EventType The type of event that occurred
@param TouchLocation Where was the touch

TraceForTapToMove Source code

simulated function Actor TraceForTapToMove ( Pawn TraceOwner, out vector HitLocation, out vector HitNormal, vector End, vector Start) )
Trace, but ignore volumes and triggers unless they are blockers (i.e. BlockingVolume)
@param TraceOwner is the player's pawn
@param HitLocation holds the location were the trace ends
@param HitNormal holds the orientation of the surface normal where it hit
@param End is where we would like the trace to end
@param Start is where the trace is starting from


Defaultproperties

defaultproperties
{
	StuckThreshHold=25
	TapToMoveAutoPitchAmount=0.25
	TapToMoveVisualMesh=StaticMesh'CastleEffects.TouchToMoveArrow'
	TapToMoveVisualMinDist=230
	TapToMoveVisualRotateSpeed=100000
	TapToMoveVisualAnimDuration=0.3

	AutoAttractTime=45
	TapToMoveSound=SoundCue'CastleAudio.UI.UI_TouchToMove_Cue'
	InvalidTapToMoveSound=SoundCue'CastleAudio.UI.UI_InvalidTouchToMove_Cue'
	TapToMoveStopSound=SoundCue'CastleAudio.UI.UI_StopTouchToMove_Cue'
	OpenMenuSound=SoundCue'CastleAudio.UI.UI_MainMenu_Cue'
	CloseMenuSound=SoundCue'CastleAudio.UI.UI_OK_Cue'
	bSplashHasBeenShown=false
	
	SliderTravelDuration=0.3
	TutorialStage=ETS_None
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Creation time: ti 22-3-2011 19:56:47.884 - Created with UnCodeX