コード例 #1
0
 // Use this for initialization
 void Start()
 {
     gazeAware   = GetComponent <GazeAware>();
     anim        = GetComponent <Animator>();
     memGameMan  = GameObject.Find("GameManager").GetComponent <MemGameMan>();
     audioSource = GameObject.Find("GameAudioSource").GetComponent <AudioSource>();
 }
コード例 #2
0
 void Start()
 {
     mGazeAwareComponent = GetComponent <GazeAware>();
     mMeshRenderer       = GetComponent <MeshRenderer>();
     mLerpColor          = mMeshRenderer.material.color;
     mDeselectionColor   = Color.black;
 }
コード例 #3
0
 /// <summary>
 /// Set the lerp color
 /// </summary>
 void Start()
 {
     enemy = this.transform.GetComponentInParent <Enemy>();
     _gazeAwareComponent = GetComponent <GazeAware>();
     _meshRenderer       = this.transform.GetComponentInParent <SpriteRenderer>();
     _lerpColor          = _meshRenderer.material.color;
     _deselectionColor   = Color.white;
 }
コード例 #4
0
 // Start is called before the first frame update
 void Start()
 {
     jogador             = GameObject.FindGameObjectWithTag("Player").transform;
     componenteGazeAware = GetComponent <GazeAware>();
     mesh      = GetComponent <MeshRenderer>();
     corLerp   = mesh.material.color;
     corNormal = Color.white;
 }
コード例 #5
0
    // Use this for initialization
    void Start()
    {
        // Move hint to position of frog
        hint.transform.position = new Vector3(transform.position.x, transform.position.y, 0.001f);

        // Get components
        gazeAware  = GetComponent <GazeAware>();
        LineDrawer = GetComponent <LineRenderer>();
    }
コード例 #6
0
ファイル: GameObjectChange.cs プロジェクト: bd15155/eye
 // Set the lerp color
 void Start()
 {
     _gazeAwareComponent = GetComponent <GazeAware>();
     _meshRenderer       = GetComponent <MeshRenderer>();
     _lerpColor          = _meshRenderer.material.color;
     _deselectionColor   = Color.white;
     Vector3    iniLookTargetSubPos = LookTargetSub.transform.position;
     Quaternion iniLookTargetSubRot = LookTargetSub.transform.rotation;
 }
コード例 #7
0
 /// <summary>
 /// Set the lerp color
 /// </summary>
 void Start()
 {
     _gazeAwareComponent = GetComponent <GazeAware>();
     _meshRenderer       = GetComponent <MeshRenderer>();
     _lerpColor          = _meshRenderer.material.color;
     _deselectionColor   = new Color(1f, 1f, 1f, 0.2f);
     _userPresence       = TobiiAPI.GetUserPresence();
     //  _deselectionColorText = new Color(1f, 1f, 1f, 0.4f);
     //  textcolor = new Color(0f,0f,0f,1f);
 }
コード例 #8
0
    void Start()
    {
        _gaze = GetComponent <GazeAware>();

        // initialize on start if client
        if (!Communicator.Player.isServer)
        {
        }
        Init();
    }
コード例 #9
0
    // Use this for initialization
    void Start()
    {
        boat = gameObject;
        gaze = boat.GetComponent <GazeAware>();
        rb   = boat.GetComponent <Rigidbody>();

        controller     = GameObject.Find("Controller");
        c              = controller.GetComponent <Controller>();
        standard_input = c.standard_input;
    }
コード例 #10
0
    // Use this for initialization
    void Start()
    {
        vm = GameObject.Find("Managers").GetComponent <VariableManager>();

        rotateCar      = false;
        inventoryPanel = false;

        rotateButton          = GameObject.Find("Rotate");
        rotateButtonGazeAware = rotateButton.GetComponent <GazeAware>();

        inventoryButton          = GameObject.Find("Inventory");
        inventoryButtonGazeAware = inventoryButton.GetComponent <GazeAware>();

        closeInventoryButton          = GameObject.Find("Close Inventory");
        closeInventoryButtonGazeAware = closeInventoryButton.GetComponent <GazeAware>();

        vm.SetButton(closeInventoryButton, false);

        blueButton = GameObject.Find("Blue");
        vm.SetButton(blueButton, false);

        blackButton = GameObject.Find("Black");
        vm.SetButton(blackButton, false);

        redButton = GameObject.Find("Red");
        vm.SetButton(redButton, false);

        blueButtonGazeAware  = blueButton.GetComponent <GazeAware> ();
        redButtonGazeAware   = redButton.GetComponent <GazeAware> ();
        blackButtonGazeAware = blackButton.GetComponent <GazeAware> ();

        car         = GameObject.Find("Audi R8");
        carAnimator = car.GetComponent <Animator>();



        // Car Parts

        engine          = GameObject.Find("Engine");
        engineGazeAware = engine.GetComponent <GazeAware> ();

        interior          = GameObject.Find("Interior");
        interiorGazeAware = interior.GetComponent <GazeAware> ();

        bodyFront          = GameObject.Find("BodyFront");
        bodyFrontGazeAware = bodyFront.GetComponent <GazeAware> ();

        bodyRear          = GameObject.Find("BodyRear");
        bodyRearGazeAware = bodyRear.GetComponent <GazeAware> ();

        implodeFlag          = false;
        bringCarPartToCenter = false;
        gazeStarted          = false;
    }
コード例 #11
0
    // Start is called before the first frame update
    void Start()
    {
        // setup the rederer for lerping between colors
        renderer = GetComponent <Renderer>();

        // get gaze aware objects
        gazeAwareComponent = GetComponent <GazeAware>();

        // set the gaze time and responsiveness to the vars in playerprefs
        gazeTime       = PlayerPrefs.GetFloat("headGazeTime");
        responsiveness = PlayerPrefs.GetFloat("headResponseTime");
    }
コード例 #12
0
        void Awake()
        {
            if (gazeAware == null)
            {
                gazeAware = GetComponent <GazeAware>();
            }

            if (targetRenderer == null)
            {
                targetRenderer = GetComponent <Renderer>();
            }
        }
コード例 #13
0
    /// <summary>
    /// Initialize the class, loading from CircleMotionSettings.
    /// </summary>
    void Awake()
    {
        settings = GameObject.FindGameObjectWithTag("MotionButtonSettings").GetComponent <CircularMotionSettings>();
        gaze     = GetComponent <GazeAware>();

        this.mainCameraTransform = settings.mainCamera.transform;
        this.gazeCameraControlCanvasTransform = settings.gazeCamaraControlCanvas.transform;
        this.mainUseCanvas         = settings.mainUseCanvas;
        this.cameraMoveSpeed       = settings.cameraMoveSpeed;
        this.startCameraPos        = settings.startCameraPos;
        this.mainUseCanvasPosition = mainUseCanvas.GetComponent <Transform>().localPosition;
        this.mainUseCanvasSize     = mainUseCanvas.GetComponent <RectTransform>().sizeDelta;
        this.mainUseCanvasScale    = mainUseCanvas.GetComponent <Transform>().localScale;
    }
コード例 #14
0
 /// <summary>
 /// Set the lerp color
 /// </summary>
 void Start()
 {
     _gazeAwareComponent = GetComponent <GazeAware>();
     _meshRenderer       = GetComponent <MeshRenderer>();
     _lerpColor          = _meshRenderer.material.color;
     if (this.tag == "black")
     {
         _deselectionColor = Color.black;
     }
     else if (this.tag == "white")
     {
         _deselectionColor = Color.white;
     }
 }
コード例 #15
0
    private void Start()
    {
        // setup the text to be gaze aware
        gazeAwareComponent = GetComponent <GazeAware>();

        // setup the color handeling
        meshRenderer = GetComponent <MeshRenderer>();


        lerpColor       = meshRenderer.material.color;
        deselectedColor = Color.yellow;

        // receive the OSC messages
        osc.SetAddressHandler("/scene", OnReceive);
    }
コード例 #16
0
    /// <summary>
    /// Initialize the class, loading from CircleMotionSettings.
    /// </summary>
    void Awake()
    {
        settings = GameObject.FindGameObjectWithTag("MotionButtonSettings").GetComponent <CircularMotionSettings>();
        gaze     = GetComponent <GazeAware>();

        this.mainCamera         = settings.mainCamera;
        this.motionCircleCanvas = settings.motionCircleCanvas;
        this.useAreaCanvas      = settings.useAreaCanvas;
        this.cameraMoveSpeed    = settings.cameraMoveSpeed;
        this.stdCameraPos       = settings.stdCameraPos;

        useAreaSize     = useAreaCanvas.GetComponent <RectTransform>().sizeDelta;
        useAreaScale    = useAreaCanvas.GetComponent <Transform>().localScale;
        useAreaPosition = useAreaCanvas.GetComponent <Transform>().localPosition;
    }
コード例 #17
0
 void Start()
 {
     _gazeAware = GetComponent<GazeAware>();
     lockonFlag = false;
     audiosource = GetComponent<AudioSource>();
 }