当前位置: 首页>>代码示例>>C#>>正文


C# Eye类代码示例

本文整理汇总了C#中Eye的典型用法代码示例。如果您正苦于以下问题:C# Eye类的具体用法?C# Eye怎么用?C# Eye使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Eye类属于命名空间,在下文中一共展示了Eye类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Start

 void Start()
 {
     _t = transform;
     crt = (Creature)_t.parent.parent.gameObject.GetComponent("Creature");
     eye = crt.eye.GetComponent<Eye>();
     lr = (LineRenderer)gameObject.AddComponent<LineRenderer>();
     lr.material.color = Color.green;
     lr.material.shader = Shader.Find("Sprites/Default");
     lr.SetWidth(line_width, line_width);
     lr.SetVertexCount(2);
     lr.GetComponent<Renderer>().enabled = true;
 }
开发者ID:clomax,项目名称:evosim,代码行数:12,代码来源:Mouth.cs

示例2: Update

    // Update is called once per frame
    void Update()
    {
        float horizontal = Input.GetAxis(m_Horizontal);
        float vertical = Input.GetAxis(m_Vertical);
        bool trigger = (Input.GetAxis(m_Trigger) > 0.1f || Input.GetButton(m_AltTrigger));

        //Check if the player is idle
        if (vertical != 0 || trigger)
        {
            m_IdleTimeoutRemaining = m_IdleTimeout;
        }
        else
        {
            m_IdleTimeoutRemaining -= Time.deltaTime;
        }

        if(!m_TargetEye && m_IdleTimeoutRemaining > 0.0f)
        {
            // OPEN The player is not idle, find an eye to use
            m_TargetEye = m_PlayerManager.GetEye();
            m_TargetEye.transform.parent = transform;
            m_TargetEye.SetColor(m_Colour);
            m_TargetEye.Open();
        }
        else if (m_TargetEye && !m_TargetEye.isClosing && m_IdleTimeoutRemaining <= 0)
        {
            // START CLOSING The player is idle, close and release the eye
            m_TargetEye.Close();
        }
        else if (m_TargetEye && m_TargetEye.isClosing && m_IdleTimeoutRemaining > 0.0f)
        {
            // INTERRUPT CLOSING if the eye is closing and the player provides input, cancel the close
            m_TargetEye.Open();
        }
        else if (m_TargetEye && m_TargetEye.isClosed)
        {
            // REMOVE EYE if the eye is finished closing, clean it up
            m_PlayerManager.ReturnEye( m_TargetEye );
            m_TargetEye = null;
        }

        if (m_TargetEye)
        {
            m_TargetEye.SetInput(horizontal, vertical);
            if (trigger)
            {
                m_TargetEye.Fire();
            }
        }
    }
开发者ID:ZNCatlaw,项目名称:LD33,代码行数:51,代码来源:LogicalEye.cs

示例3: Awake

    void Awake()
    {
        activator = GetComponentInChildren<Activator>();
        eye = GetComponentInChildren<Eye>();
        inventory = GetComponentInChildren<Inventory>();
        lastPositionKeeper = GetComponentInChildren<LastPositionKeeper>();
        head = GetComponentInChildren<Head>();
        cameraPlace = GetComponentInChildren<CameraPlace>();
        undo = GetComponentInChildren<Undo>();
        characterController = GetComponentInChildren<CharacterController>();
        rewind = GetComponentInChildren<Rewind>();
        slowmo = GetComponentInChildren<Slowmo>();
        gravity = GetComponentInChildren<Gravity>();

        all.Add(this);
    }
开发者ID:craus,项目名称:UnityTest,代码行数:16,代码来源:Unit.cs

示例4: setEyes

 public void setEyes(Eye eye, EyeStatus status)
 {
     switch (eye)
     {
         case Eye.Left:
             this.setEye(this.leftEyePictureBox, status);
             break;
         case Eye.Right:
             this.setEye(this.rightEyePictureBox, status);
             break;
         default:
             this.setEye(this.leftEyePictureBox, EyeStatus.Closed);
             this.setEye(this.rightEyePictureBox, EyeStatus.Closed);
             break;
     }
 }
开发者ID:GEMISIS,项目名称:Kinect-for-Windows-2.0-Demo,代码行数:16,代码来源:FacialDiagram.cs

示例5: Start

#pragma warning restore 0414

	void Start () {
		settings = Settings.getInstance();
		
		_t = transform;
		gameObject.tag = "Genital";
		crt = (Creature)_t.parent.parent.gameObject.GetComponent("Creature");
		lg = Logger.getInstance();
		co = CollisionMediator.getInstance();
		eye = crt.eye.gameObject.GetComponent<Eye>();
		
		_t = transform;
		lr = (LineRenderer)gameObject.AddComponent<LineRenderer>();
		lr.material.color = Color.white;
		lr.material.shader = Shader.Find("Sprites/Default");
		lr.SetWidth(line_width, line_width);
		lr.SetVertexCount(2);
		lr.GetComponent<Renderer>().enabled = true;
		timeCreated = Time.time;
		
		line_length = 	float.Parse( settings.contents["genitalia"]["line_length"].ToString() );
	}
开发者ID:clomax,项目名称:evosim,代码行数:23,代码来源:Genitalia.cs

示例6: EyeEaten

    //only used by eye
    public void EyeEaten(Eye e)
    {
        bool eaten = false;

        for(int i = 0; i < mEyes.Length; i++) {
            if(mEyes[i] == e) {
                e.transform.parent = mEyeParents[i];
                e.transform.localPosition = Vector3.zero;
                e.transform.localRotation = Quaternion.identity;
                e.transform.localScale = Vector3.one;
                mEyeParents[i].gameObject.SetActiveRecursively(false);
                mNumActiveEyes--;
                eaten = true;
                break;
            }
        }

        if(eaten) {
            stats.ApplyDamage(1);
            DoHurt();
        }
    }
开发者ID:ddionisio,项目名称:GitGirl,代码行数:23,代码来源:BossLevelOne.cs

示例7: GetProjectionMatrix

 /// <summary>
 /// Get the projection matrix for a specified eye.
 /// </summary>
 /// <param name="eye">The eye: left, right, or center.</param>
 /// <returns>The projection matrix in Matrix4x4 format.</returns>
 public Matrix4x4 GetProjectionMatrix(Eye eye)
 {
     return _projectionMatrices[(int)eye];
 }
开发者ID:jacthoma,项目名称:Project-Elephant,代码行数:9,代码来源:ZSCore.cs

示例8: GetEyePosition

 /// <summary>
 /// Get the position of a specified eye.
 /// </summary>
 /// <param name="eye">The eye: left, right, or center.</param>
 /// <returns>The position of the eye in Vector3 format.</returns>
 public Vector3 GetEyePosition(Eye eye)
 {
     float[] positionData = new float[3];
     zsup_getEyePosition((int)eye, positionData);
     return this.ConvertToVector3(positionData);
 }
开发者ID:jacthoma,项目名称:Project-Elephant,代码行数:11,代码来源:ZSCore.cs

示例9: UndistortedProjection

 public Matrix4x4 UndistortedProjection(Eye eye)
 {
     return Projection(eye, Distortion.Undistorted);
 }
开发者ID:JIsnor,项目名称:VR_Asteroids,代码行数:4,代码来源:Cardboard.cs

示例10: EyeView

 public Matrix4x4 EyeView(Eye eye)
 {
     return EyePose(eye).Matrix;
 }
开发者ID:JIsnor,项目名称:VR_Asteroids,代码行数:4,代码来源:Cardboard.cs

示例11: EyePose

 /// The transformation from head to eye.
 public Pose3D EyePose(Eye eye)
 {
     return device.GetEyePose(eye);
 }
开发者ID:JIsnor,项目名称:VR_Asteroids,代码行数:5,代码来源:Cardboard.cs

示例12: ovrHmd_GetEyeTimewarpMatrices

		private static extern void ovrHmd_GetEyeTimewarpMatrices(
				IntPtr hmd,
			   	Eye eye,
			   	Posef renderPose,
				[MarshalAs(UnmanagedType.LPArray, SizeConst = 2)]
				[Out] Matrix4f_Raw[] twnOut);
开发者ID:benlewis,项目名称:unhinged_vr,代码行数:6,代码来源:OvrCapi.cs

示例13: ovrp_GetEyePose

		public static extern Posef ovrp_GetEyePose(Eye eyeId);
开发者ID:teambonuspoints,项目名称:eeroscloud,代码行数:1,代码来源:OVRPlugin.cs

示例14: ovrp_GetEyeTextureSize

		public static extern Sizei ovrp_GetEyeTextureSize(Eye eyeId);
开发者ID:teambonuspoints,项目名称:eeroscloud,代码行数:1,代码来源:OVRPlugin.cs

示例15: ovrp_GetEyeFrustum

		public static extern Frustumf ovrp_GetEyeFrustum(Eye eyeId);
开发者ID:teambonuspoints,项目名称:eeroscloud,代码行数:1,代码来源:OVRPlugin.cs


注:本文中的Eye类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。