|
|
|
|
|
|
static List<ARPlane> s_Planes = new List<ARPlane>(); |
|
|
|
|
|
|
|
bool m_ShowingTapToPlace = false; |
|
|
|
|
|
|
|
bool m_ShowingMoveDevice = true; |
|
|
|
|
|
|
|
void OnEnable() |
|
|
|
|
|
|
{ |
|
|
|
if (PlanesFound() && m_ShowingMoveDevice) |
|
|
|
{ |
|
|
|
m_MoveDeviceAnimation.SetTrigger(k_FadeOffAnim); |
|
|
|
m_TapToPlaceAnimation.SetTrigger(k_FadeOnAnim); |
|
|
|
if (moveDeviceAnimation) |
|
|
|
moveDeviceAnimation.SetTrigger(k_FadeOffAnim); |
|
|
|
|
|
|
|
if (tapToPlaceAnimation) |
|
|
|
tapToPlaceAnimation.SetTrigger(k_FadeOnAnim); |
|
|
|
|
|
|
|
m_ShowingTapToPlace = true; |
|
|
|
m_ShowingMoveDevice = false; |
|
|
|
} |
|
|
|
|
|
|
{ |
|
|
|
if (m_PlaneManager) |
|
|
|
{ |
|
|
|
m_PlaneManager.GetAllPlanes(m_Planes); |
|
|
|
return m_Planes.Count > 0; |
|
|
|
} |
|
|
|
return false; |
|
|
|
if (planeManager == null) |
|
|
|
return false; |
|
|
|
|
|
|
|
planeManager.GetAllPlanes(s_Planes); |
|
|
|
return s_Planes.Count > 0; |
|
|
|
} |
|
|
|
|
|
|
|
void PlacedObject() |
|
|
|
|
|
|
m_TapToPlaceAnimation.SetTrigger(k_FadeOffAnim); |
|
|
|
if (tapToPlaceAnimation) |
|
|
|
tapToPlaceAnimation.SetTrigger(k_FadeOffAnim); |
|
|
|
|
|
|
|
|
|
|
|
} |