Пример #1
0
    private void Start()
    {
        m_dragRigidbody = FindObjectOfType <DragRigidbody>();
        m_foodManager   = FindObjectOfType <FoodManager>();
        audioSource     = GetComponent <AudioSource>();

        StartCoroutine(LoseFoodOverTime());
    }
Пример #2
0
 /// <summary>
 /// Set the current moveable object and start input
 /// </summary>
 /// <param name="moveable"></param>
 public void SetCurrentMoveable(GameObject moveable)
 {
     currentMoveable = moveable.GetComponent <DragRigidbody>();
     currentMoveable.GetComponent <Rigidbody>().isKinematic = false;
     StartCoroutine(EnableMoveableCollider());
     start.enabled = false;
     ToggleMoveableSelectable(false);
     currentMoveable.HandleInputBegin(Input.mousePosition);
 }
Пример #3
0
 /// <summary>
 /// Finished moving once object's velocity is 0
 /// </summary>
 public void FinishedMoving()
 {
     currentMoveable.HandleInputEnd(Input.mousePosition);
     currentMoveable.GetComponent <Rigidbody>().isKinematic = true;
     currentMoveable.GetComponent <Collider>().enabled      = false;
     currentMoveable = null;
     ToggleMoveableSelectable(true);
     start.enabled = true;
 }
Пример #4
0
 public DragObject$1(float distance, DragRigidbody self_)
 {
     this.$distance10 = distance;
     this.$self_11    = self_;
 }