void Awake() { Cam.transform.parent = transform; camScr = Cam.GetComponent <CameraController2>(); camScr.enabled = false; distanceToTimeTranslaterScript = GetComponent <DistanceToTimeTranslaterScript>(); }
DateTime lastCall = DateTime.Now; // controlling the pace of the machine vision analysis public Camera2BasicSurfaceTextureListener(CameraController2 owner) { if (owner == null) { throw new System.ArgumentNullException("owner"); } this.owner = owner; }
public CameraStateListener(CameraController2 owner) { if (owner == null) { throw new System.ArgumentNullException("owner"); } this.owner = owner; }
public CameraCaptureSessionCallback(CameraController2 owner) { if (owner == null) { throw new System.ArgumentNullException("owner"); } this.owner = owner; }
// Use this for initialization void Start() { FadeScript = GameObject.Find("Fade").GetComponent <Fade>(); //Message = GameObject.Find("Message").GetComponent<TutorialMessageController>(); Window = GameObject.Find("Window").GetComponent <MessageController>(); Camera = GameObject.Find("CameraRig").GetComponent <CameraController2>(); }
//////// void Awake() { // cameraController = GetComponent<CameraRayCaster>(); SelectionManager2.singleton.InitialFloorSetup(); SelectionManager2.singleton.enabled = false; cameraController = GetComponent <CameraController2>(); startPos = transform.position - transform.forward * farLevel; endPos = transform.position; cameraController.enabled = false; }
public ImageAvailableListener(CameraController2 fragment, File file) { if (fragment == null) { throw new System.ArgumentNullException("fragment"); } if (file == null) { throw new System.ArgumentNullException("file"); } owner = fragment; this.file = file; }
// Update is called once per frame void Update() { if (thePlayer == null) { thePlayer = FindObjectOfType <PlayerMovement2>(); thePlayer.transform.position = transform.position; thePlayer.lastMove = startDirection; } if (theCamera == null) { theCamera = FindObjectOfType <CameraController2>(); theCamera.transform.position = new Vector3(transform.position.x, transform.position.y, theCamera.transform.position.z); } }
private void Start() { rb = GetComponent <Rigidbody2D>(); anim = transform.Find("PlayerVisuals").GetComponent <Animator>(); playerStats = GetComponent <PlayerStats>(); playerRaycastsScr = GetComponent <PlayerRaycasts>(); playerJumpScr = GetComponent <PlayerJump>(); playerDashScr = GetComponent <PlayerDash>(); checkpointBaseScr = GameObject.Find("Manager_Checkpoints").GetComponent <CheckpointBase>(); playerState = GameObject.Find("Manager_PlayerState").GetComponent <PlayerState>(); fadeBlackScreenScr = GameObject.Find("HUD_BlackScreen").GetComponent <FadeBlackScreen>(); cameraControllerScr = GameObject.Find("Main Camera").GetComponent <CameraController2>(); StartCoroutine(FadeBlackScreenOut()); StartCoroutine(SetPlayerStartValues()); }
public CameraAnalyzer(CameraSurfaceView surfaceView) { cameraController = new CameraController2(); cameraController.Init(surfaceView); cameraController.mSurfaceTextureListener.OnPreviewFrameReady += HandleOnPreviewFrameReady; InitTensorflowLineService(); var outputInfo = new SKImageInfo( TensorflowLiteService.ModelInputSize_PlateAndMoto, TensorflowLiteService.ModelInputSize_PlateAndMoto, SKColorType.Bgra8888); inputScaled_PlateAndMoto = new SKBitmap(outputInfo); colors_PlateAndMoto = inputScaled_PlateAndMoto.GetPixels(); colorCount_PlateAndMoto = TensorflowLiteService.ModelInputSize_PlateAndMoto * TensorflowLiteService.ModelInputSize_PlateAndMoto; var outputInfo2 = new SKImageInfo( TensorflowLiteService.ModelInputSize_MotoModel, TensorflowLiteService.ModelInputSize_MotoModel, SKColorType.Bgra8888); inputScaled_MotoModel = new SKBitmap(outputInfo2); colors_MotoModel = inputScaled_MotoModel.GetPixels(); colorCount_MotoModel = TensorflowLiteService.ModelInputSize_MotoModel * TensorflowLiteService.ModelInputSize_MotoModel; stopwatch = new Stopwatch(); cameraFPSCounter = new FPSCounter((x) => { MainActivity.PlateAndMotoStats.CameraFps = x.fps; MainActivity.PlateAndMotoStats.CameraMs = x.ms; MainActivity.MotoModelStats.CameraFps = x.fps; MainActivity.MotoModelStats.CameraMs = x.ms; }); processingFPSCounter = new FPSCounter((x) => { MainActivity.PlateAndMotoStats.ProcessingFps = x.fps; MainActivity.PlateAndMotoStats.ProcessingMs = x.ms; MainActivity.MotoModelStats.ProcessingFps = x.fps; MainActivity.MotoModelStats.ProcessingMs = x.ms; }); }
float sizeOrtog; // modo de câmera ortográfica void Start() { if (Singleton == null) { Singleton = this; } else { Destroy(gameObject); } targ = GameController.singleton.playerManager.playersControllers; cam = Camera.main; cam.transform.position = new Vector3(0, alturaCam, -10); cam.orthographicSize = 8; }
void Start() { controller = GetComponent <CharacterController>(); _manager = LobbyManager.singleton.GetComponent <LobbyManager>(); _animator = GetComponent <Animator>(); _scenarioScript = Camera.main.GetComponent <Scenario>(); ToadScript = _scenarioScript.Toad.GetComponent <ToadController>(); _eggImage = _scenarioScript.EggImage; _sea = _scenarioScript.Sea; _audioSource = GetComponent <AudioSource>(); PlayerCamera = Camera.main; _textMesh = PlayerNameTextMesh.GetComponent <TextMeshPro>(); playerName = _manager.UserName; EggText = GameObject.FindGameObjectWithTag("EggQuantityText").GetComponent <Text>(); UpdateEggText(); if (isLocalPlayer) { CameraController2 cameraController = PlayerCamera.GetComponent <CameraController2>(); cameraController.LookAtTarget(cameraPoint); _textMesh.enabled = false; } _normalEggs = new List <GameObject>(); while (_normalEggs.Count < 10) { GameObject egg = (GameObject)Instantiate(this.EggPrefab, new Vector3(-100, -100, -1000), Quaternion.identity); egg.GetComponent <EggBehaviour>().Owner = transform.gameObject; _normalEggs.Add(egg); } _specialEgg = (GameObject)Instantiate(this.BigEggPrefab, new Vector3(-100, -100, -1000), Quaternion.identity); _specialEgg.GetComponent <EggBehaviour>().Owner = transform.gameObject; }
private void Start() { Camera = GameObject.Find("CameraRig").GetComponent <CameraController2>(); }
public void SetCamera2(CameraController2 in_camera) { _camera2 = in_camera; }
private void MoveCamera(NetworkInstanceId winner) { CameraController2 cameraController = PlayerCamera.GetComponent <CameraController2>(); cameraController.LookAtTarget(ClientScene.FindLocalObject(winner)); }