Пример #1
0
 /* Called when the objective is completed and applies ending states to the object
  */
 public void OnObjectiveFinish()
 {
     objectiveState = Objective.ObjectiveStates.NotInProgress;
     ApplyEndingConditions();
     interactable.highlightOnHover = false;
     CompletionEvent();
 }
 public void OnObjectiveFinish()
 {
     objectiveState   = Objective.ObjectiveStates.NotInProgress;
     highlightOnHover = false;
     GetComponent <Interactable>().highlightOnHover = false;
     CompletionEvent();
 }
 public void OnObjectiveFinish()
 {
     objectiveState = Objective.ObjectiveStates.NotInProgress;
     Destroy(teleporterCollider);
     teleportActiveState        = false;
     teleportPoint.markerActive = false;
     teleportPoint.gameObject.SetActive(false);
     if (CompletionEvent != null)
     {
         CompletionEvent();
     }
 }
 public void OnObjectiveStart()
 {
     objectiveState               = Objective.ObjectiveStates.InProgress;
     teleporterCollider           = gameObject.AddComponent <CapsuleCollider>();
     teleporterCollider.center    = new Vector3(teleportPoint.transform.localPosition.x, teleportPoint.transform.localPosition.y + colliderHeight / 2, teleportPoint.transform.localPosition.z);
     teleporterCollider.radius    = colliderRadius;
     teleporterCollider.height    = colliderHeight;
     teleporterCollider.direction = 1; // Y-axis
     teleporterCollider.isTrigger = true;
     teleportActiveState          = true;
     teleportPoint.gameObject.SetActive(teleportActiveState);
     teleportPoint.markerActive = teleportActiveState;
 }
Пример #5
0
 public void OnObjectiveFinish()
 {
     objectiveState   = Objective.ObjectiveStates.NotInProgress;
     highlightOnHover = false;
     gameObject.GetComponent <Interactable>().highlightOnHover = false;
     //if (hand.AttachedObjects.Count > 0 && HandHoverUpdate.AttachedObjects.Contains(dummyObject))
     //{
     //    hand.DetachObject(dummyObject);
     //}
     if (CompletionEvent != null)
     {
         CompletionEvent();
     }
 }
 public void OnObjectiveStart()
 {
     rotationCount       = 0;
     startingPosition    = transform.position;
     startingRotation    = transform.rotation;
     totalDegreesRotated = 0;
     highlightOnHover    = true;
     GetComponent <Interactable>().highlightOnHover = true;
     objectiveState = Objective.ObjectiveStates.InProgress;
     if (rotationDirection == RotationDirections.Clockwise && requiredDegreesOfRotation < 0)
     {
         requiredDegreesOfRotation *= -1;
     }
     else if (rotationDirection == RotationDirections.Counterclockwise && requiredDegreesOfRotation > 0)
     {
         requiredDegreesOfRotation *= -1;
     }
 }
Пример #7
0
 /* Initializes the this object with the settings of the objective and resets any state variables
  */
 public void OnObjectiveStart()
 {
     objectiveState   = Objective.ObjectiveStates.InProgress;
     highlightOnHover = true;
     interactable.highlightOnHover = true;
     ApplyStartConditions();
     Debug.Log(ObjectiveType);
     if (ObjectiveType == Objective.PartObjectiveTypes.MoveToLocation)
     {
         endPointActiveState = true;
         InitializeEndPoint();
         if (endPointGameObject != null)
         {
             endPointGameObject.SetActive(endPointActiveState);
             SetEndPointVisibility(showEndPointOutline);
             Debug.Log("EndPoint Created, active: " + endPointActiveState + " visible: " + showEndPointOutline);
         }
     }
     else if (ObjectiveType == Objective.PartObjectiveTypes.MoveFromLocation)
     {
         SetEndPointVisibility(false);
     }
 }
Пример #8
0
 public void OnObjectiveStart()
 {
     objectiveState   = Objective.ObjectiveStates.InProgress;
     highlightOnHover = true;
     gameObject.GetComponent <Interactable>().highlightOnHover = true;
 }