Example #1
0
 private void Update()
 {
     if (m_MaterialCount == 0)
     {
         ClearButton.DisableButton();
     }
     else
     {
         ClearButton.EnableButton();
     }
 }
    /// <summary>
    /// Trigger the collision event.
    /// </summary>
    /// <param name="collidedObject">The object collided with the environment.</param>
    /// <param name="collisionPercentage">The collision percentage.</param>
    public override void Trigger(GameObject collidedObject, float collisionPercentage = 1f)
    {
        m_ManipulatedObject   = collidedObject;
        m_CollisionPercentage = collisionPercentage;

        if (collisionPercentage > k_MidBound)
        {
            m_CollisionAnimationProgress = 0f;
            PlaceButton.DisableButton();
        }
    }