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