本文整理汇总了C#中InteractionObject类的典型用法代码示例。如果您正苦于以下问题:C# InteractionObject类的具体用法?C# InteractionObject怎么用?C# InteractionObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InteractionObject类属于命名空间,在下文中一共展示了InteractionObject类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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));
}
示例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));
}
示例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;
}
示例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;
}
示例5: AttemptExitEnd
public void AttemptExitEnd(InteractionObject obj)
{
if (numberOfPapers == 0)
{
var closeSound = obj.GetComponent<AudioSource>();
if (closeSound != null)
closeSound.Play();
StartCoroutine(ExitCoroutine());
}
}
示例6: GoToHallwayEnd
public void GoToHallwayEnd(InteractionObject obj)
{
// Only load hallway if keycard has been found
if (keycardFound)
{
StartCoroutine(ExitToHallwayCoroutine());
}
else
{
convoManager.RunConversation(keycardNotFoundConvo);
}
}
示例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;
}
示例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;
}
}
}
}
示例9: OnEffectorPickUp
private void OnEffectorPickUp(
FullBodyBipedEffector effectorType,
InteractionObject interactionObject)
{
if (this.InteractionPickUp != null)
this.InteractionPickUp(this, effectorType, interactionObject);
}
示例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));
}
示例11: OnEffectorResume
private void OnEffectorResume(
FullBodyBipedEffector effectorType,
InteractionObject interactionObject)
{
if (this.InteractionResume != null)
this.InteractionResume(this, effectorType, interactionObject);
}
示例12: AttemptExitStart
public void AttemptExitStart(InteractionObject obj)
{
obj.objectDialog = numberOfPapers == 0 ? exitAllowed : exitNotAllowed;
}
示例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;
}
示例14: OnEffectorStart
private void OnEffectorStart(
FullBodyBipedEffector effectorType,
InteractionObject interactionObject)
{
if (this.InteractionStart != null)
this.InteractionStart(this, effectorType, interactionObject);
}
示例15: LoadTheScene
public void LoadTheScene(InteractionObject obj)
{
SceneManager.LoadScene(scene);
}