public CameraStateMachine(WorldCamera camera) { Register(new CameraStateTitle(this, camera), CameraStateType.Title); Register(new CameraStateRace(this, camera), CameraStateType.Race); Register(new CameraStateSky(this, camera), CameraStateType.Sky); Dispatch((int)CameraStateType.Title); }
void FindOrCreateGameCamera() { if (_worldCamera != null) { return; } _worldCamera = GameObject.FindObjectOfType <WorldCamera>(); }
public CameraStateSky(CameraStateMachine stateMachine, WorldCamera camera) : base(stateMachine, camera) { }
public CameraState(CameraStateMachine stateMachine, WorldCamera camera) : base(stateMachine) { WorldCamera = camera; }