コード例 #1
0
 public void StartPlacingObject(ModalObject obj)
 {
     SelectionManager.Instance.DeselectAll();
     objectToPlace = obj;
     objectToPlace.SetState(ModalObject.PlacementState.MOVING);
     placeObjectStartTime = Time.time;
     UIManager.Instance.DisablePlacementMenu();
 }
コード例 #2
0
 public void ObjectPlaced()
 {
     if (objectToPlace.IsValidSurface(surfaceTracker.mTargetSurface))
     {
         objectToPlace.SetState(ModalObject.PlacementState.PLACED);
         SelectionManager.Instance.ObjectSelected(objectToPlace);
         objectToPlace = null;
         UIManager.Instance.EnablePlacementMenu();
         UIManager.Instance.HideInstructions();
     }
     else
     {
         // play sound
     }
 }