Ejemplo n.º 1
0
 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;
        }
Ejemplo n.º 3
0
 public CameraStateListener(CameraController2 owner)
 {
     if (owner == null)
     {
         throw new System.ArgumentNullException("owner");
     }
     this.owner = owner;
 }
Ejemplo n.º 4
0
 public CameraCaptureSessionCallback(CameraController2 owner)
 {
     if (owner == null)
     {
         throw new System.ArgumentNullException("owner");
     }
     this.owner = owner;
 }
Ejemplo n.º 5
0
    // 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>();
    }
Ejemplo n.º 6
0
    ////////

    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;
    }
Ejemplo n.º 7
0
        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;
        }
Ejemplo n.º 8
0
    // 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);
        }
    }
Ejemplo n.º 9
0
    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());
    }
Ejemplo n.º 10
0
        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;
            });
        }
Ejemplo n.º 11
0
    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;
    }
Ejemplo n.º 12
0
    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;
    }
Ejemplo n.º 13
0
 private void Start()
 {
     Camera = GameObject.Find("CameraRig").GetComponent <CameraController2>();
 }
Ejemplo n.º 14
0
 public void SetCamera2(CameraController2 in_camera)
 {
     _camera2 = in_camera;
 }
Ejemplo n.º 15
0
    private void MoveCamera(NetworkInstanceId winner)
    {
        CameraController2 cameraController = PlayerCamera.GetComponent <CameraController2>();

        cameraController.LookAtTarget(ClientScene.FindLocalObject(winner));
    }