// Update is called once per frame
 void FixedUpdate()
 {
     if (Input.GetMouseButton(0) && isSelectedComputer.isHighlighted())
     {
         rigidbodyToApplyForceTo.AddRelativeForce(Vector3.right * force, ForceMode.Force);
     }
 }
Exemple #2
0
 // Update is called once per frame
 void Update()
 {
     myMaterial.color = isSelectedComputer.isHighlighted() ? highlightedColor : originalColor;
 }