• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# InteractionObject类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: DisplayObject

    public void DisplayObject(InteractionObject interactionObject)
    {
        // Run world behaviors resulting from interaction
        interactionObject.onInteractionBegin.Invoke(interactionObject);

        if (interactionObject.objectDialog != null)
        {
            dialog.SetDialogQueue(interactionObject.objectDialog);
            dialog.DisplayNextCard();
        }
        else if(interactionObject.objectConversation != null)
        {
            FindObjectOfType<ConversationManager>().RunConversation(interactionObject.objectConversation);
        }

        GameObject currentInspectedObject = null;

        if (interactionObject.isInspectable)
        {
            currentInspectedObject = (GameObject)Instantiate(interactionObject.objectToInspect, this.transform.position, Quaternion.Euler(interactionObject.interactionRotation));
            currentInspectedObject.transform.parent = this.transform;

            PlaceObjectToFit(currentInspectedObject);

            camera.enabled = true;
            cameraGrayscale.effectAmount = 1;
        }

        StartCoroutine(CloseInteractionCamera(interactionObject, currentInspectedObject));
    }
开发者ID:GlowLimeGames,项目名称:the-experiment,代码行数:30,代码来源:InteractionCamera.cs


示例2: ST_Approach

 protected Node ST_Approach(Transform target1, Transform target2, InteractionObject cp)
 {
     //foreach (GameObject n in chara) {
     Val<Vector3> position1 = Val.V (() => target1.position);
     Val<Vector3> position2 = Val.V (() => target2.position);
     //print ("hello");
     return new SequenceParallel (participant2.GetComponent<BehaviorMecanim> ().Node_GoTo (position1), participant1.GetComponent<BehaviorMecanim> ().Node_GoTo (position1));
 }
开发者ID:CG-F15-13-Rutgers,项目名称:UnityProjects,代码行数:8,代码来源:MyBehaviorTree.cs


示例3: OnInteractionFinish

 private void OnInteractionFinish(
     FullBodyBipedEffector effector,
     InteractionObject obj)
 {
     if (this.finish == null)
         this.finish = new Dictionary<FullBodyBipedEffector, bool>();
     if (this.finish.ContainsKey(effector))
         this.finish[effector] = true;
 }
开发者ID:fgeraci,项目名称:CS195-Core,代码行数:9,代码来源:CharacterMecanim.cs


示例4: OnInteractionTrigger

 private void OnInteractionTrigger(
     FullBodyBipedEffector effector, 
     InteractionObject obj)
 {
     if (this.triggers == null)
         this.triggers = new Dictionary<FullBodyBipedEffector, bool>();
     if (this.triggers.ContainsKey(effector))
         this.triggers[effector] = true;
 }
开发者ID:fgeraci,项目名称:CS195-Core,代码行数:9,代码来源:CharacterMecanim.cs


示例5: AttemptExitEnd

    public void AttemptExitEnd(InteractionObject obj)
    {
        if (numberOfPapers == 0)
        {
            var closeSound = obj.GetComponent<AudioSource>();
            if (closeSound != null)
                closeSound.Play();

            StartCoroutine(ExitCoroutine());
        }
    }
开发者ID:GlowLimeGames,项目名称:the-experiment,代码行数:11,代码来源:RecordsRoomScript.cs


示例6: GoToHallwayEnd

 public void GoToHallwayEnd(InteractionObject obj)
 {
     // Only load hallway if keycard has been found
     if (keycardFound)
     {
         StartCoroutine(ExitToHallwayCoroutine());
     }
     else
     {
         convoManager.RunConversation(keycardNotFoundConvo);
     }
 }    
开发者ID:GlowLimeGames,项目名称:the-experiment,代码行数:12,代码来源:HallwayOpen.cs


示例7: connectToObject

    public void connectToObject(InteractionObject obj, InteractionPointConnectMethod connectMode = InteractionPointConnectMethod.MIRROR)
    {
        _interactionObject = obj;

        if (connectMode == InteractionPointConnectMethod.MIRROR) {
            connectToObjectMirror(obj);
        } else {
            if (connectMode == InteractionPointConnectMethod.SURFACE) {
                connectToObjectSurface(obj);
            } else {
                if (obj.isInsideW(_globalPosition, InteractionHand.SIZE) == (connectMode == InteractionPointConnectMethod.INSIDE)) {
                    connectToObjectMirror(obj);
                } else {
                    connectToObjectSurface(obj);
                }
            }
        }

        _isConnected = true;
    }
开发者ID:imclab,项目名称:SpaceLeap,代码行数:20,代码来源:InteractionPoint.cs


示例8: PickUp

	void PickUp()
	{
		if(Input.GetKeyDown(KeyCode.P))//Input.GetKey("PickUp"))
		{
			float x = Screen.width /2; 
			float y = Screen.height/2;

			Ray ray = mainCam.ScreenPointToRay(new Vector3(x,y));
			RaycastHit hit;

			if(Physics.Raycast(ray, out hit))
			{
				selectedObject = hit.collider.GetComponent<InteractionObject>();
				if(selectedObject != null)
				{
					carrying = true;
					carryingObject = selectedObject.RBody;
				}
			}

		}
	}
开发者ID:FIU-SCIS-Senior-Projects,项目名称:SmartBuilding4,代码行数:22,代码来源:InteractionController.cs


示例9: OnEffectorPickUp

 private void OnEffectorPickUp(
     FullBodyBipedEffector effectorType, 
     InteractionObject interactionObject)
 {
     if (this.InteractionPickUp != null)
         this.InteractionPickUp(this, effectorType, interactionObject);
 }
开发者ID:nickgirardo,项目名称:KADAPT,代码行数:7,代码来源:CrossfadeInteractionHandler.cs


示例10: ST_Get_Ball

 protected Node ST_Get_Ball(GameObject picker, FullBodyBipedEffector effector, InteractionObject ball, string tracer)
 {
     Val<FullBodyBipedEffector> eff = Val.V(() => effector);
     Val<InteractionObject> ba = Val.V(() => ball);
     return new Sequence(
         new LeafTrace(tracer),
         picker.GetComponent<BehaviorMecanim>().Node_StartInteraction(eff, ba),
         new LeafWait(1000));
 }
开发者ID:CG-F15-23-Rutgers,项目名称:UnityProjects,代码行数:9,代码来源:Behavior.cs


示例11: OnEffectorResume

 private void OnEffectorResume(
     FullBodyBipedEffector effectorType, 
     InteractionObject interactionObject)
 {
     if (this.InteractionResume != null)
         this.InteractionResume(this, effectorType, interactionObject);
 }
开发者ID:nickgirardo,项目名称:KADAPT,代码行数:7,代码来源:CrossfadeInteractionHandler.cs


示例12: AttemptExitStart

 public void AttemptExitStart(InteractionObject obj)
 {
     obj.objectDialog = numberOfPapers == 0 ? exitAllowed : exitNotAllowed;
 }
开发者ID:GlowLimeGames,项目名称:the-experiment,代码行数:4,代码来源:RecordsRoomScript.cs


示例13: PerformSwap

        private void PerformSwap(FullBodyBipedEffector effector, InteractionObject obj)
        {
            // Move all the effectors to the secondary IK solver
            foreach (var kv in this.primaryEffectors)
            {
                if (kv.Key != effector)
                {
                    this.handlerSecondary.StartInteraction(kv.Key, kv.Value, true);
                    this.secondaryEffectors[kv.Key] = kv.Value;
                }
            }
            this.handlerSecondary.StartInteraction(effector, obj, true);
            this.secondaryEffectors[effector] = obj;

            // Swap solvers
            this.Swap();

            // Store the intermediate state
            float time = Time.time;
            this.swapTimeFinish = time + this.SwapTime;
            this.state = BodyIKState.Swapping;
        }
开发者ID:CG-F15-20-Rutgers,项目名称:UnityProjects,代码行数:22,代码来源:IKController.cs


示例14: OnEffectorStart

 private void OnEffectorStart(
     FullBodyBipedEffector effectorType, 
     InteractionObject interactionObject)
 {
     if (this.InteractionStart != null)
         this.InteractionStart(this, effectorType, interactionObject);
 }
开发者ID:nickgirardo,项目名称:KADAPT,代码行数:7,代码来源:CrossfadeInteractionHandler.cs


示例15: LoadTheScene

 public void LoadTheScene(InteractionObject obj)
 {
     SceneManager.LoadScene(scene);
 }
开发者ID:GlowLimeGames,项目名称:the-experiment,代码行数:4,代码来源:LoadScene.cs


示例16: OnInteractionTrigger

 private void OnInteractionTrigger(
     CrossfadeInteractionHandler handler,
     FullBodyBipedEffector effectorType,
     InteractionObject interactionObject)
 {
     if (this.BodyTrigger != null)
         this.BodyTrigger(effectorType, interactionObject);
 }
开发者ID:CG-F15-20-Rutgers,项目名称:UnityProjects,代码行数:8,代码来源:IKController.cs


示例17: OnInteractionRelease

 private void OnInteractionRelease(
     FullBodyBipedEffector effectorType,
     InteractionObject interactionObject)
 {
     if (this.InteractionRelease != null)
         this.InteractionRelease(effectorType, interactionObject);
 }
开发者ID:fgeraci,项目名称:CS195-Core,代码行数:7,代码来源:BodyMecanim.cs


示例18: StartInteraction

    /// <summary>
    /// Starts the interaction between an effector and an interaction object.
    /// </summary>
    public void StartInteraction(
        FullBodyBipedEffector effectorType, 
        InteractionObject interactionObject, 
        bool interrupt)
    {
        if (!IsValid(true)) return;

        for (int i = 0; i < interactionEffectors.Length; i++)
        {
            if (interactionEffectors[i].effectorType == effectorType)
            {
                interactionEffectors[i].Start(
                    interactionObject,
                    targetTag,
                    fadeInTime,
                    interrupt);
                return;
            }
        }
    }
开发者ID:nickgirardo,项目名称:KADAPT,代码行数:23,代码来源:CrossfadeInteractionHandler.cs


示例19: GoToHallwayBegin

 public void GoToHallwayBegin(InteractionObject obj)
 {
     // Make sure no dialog runs
     obj.objectDialog = null;
 }
开发者ID:GlowLimeGames,项目名称:the-experiment,代码行数:5,代码来源:HallwayOpen.cs


示例20: FoundKeycard

 public void FoundKeycard(InteractionObject obj)
 {
     keycardFound = true;
 }
开发者ID:GlowLimeGames,项目名称:the-experiment,代码行数:4,代码来源:HallwayOpen.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# InteractionObjectPair类代码示例发布时间:2022-05-24
下一篇:
C# InteractionInstanceParameters类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap