Пример #1
0
 public void OnBeltExit(BeltController belt)
 {
     if (_activeBelts.Contains(belt))
     {
         _activeBelts.Remove(belt);
     }
 }
Пример #2
0
 public void OnBeltEnter(BeltController belt)
 {
     if (!_activeBelts.Contains(belt))
     {
         _activeBelts.Add(belt);
     }
 }
Пример #3
0
	/*******************************/

	void Start ()
	{
		belt = transform.FindChild ("Belt").GetComponent<BeltController> ();
		leftwheel = transform.FindChild ("left_wheel").GetComponent<WheelController> ();
		rightwheel = transform.FindChild ("right_wheel").GetComponent<WheelController> ();
		belt.speed = currspeed;
		belt.friction = friction;
		leftwheel.speed = currspeed;
		leftwheel.friction = friction;
		rightwheel.speed = currspeed;
		rightwheel.friction = friction;
	}
Пример #4
0
    /*******************************/

    void Start()
    {
        belt                = transform.FindChild("Belt").GetComponent <BeltController> ();
        leftwheel           = transform.FindChild("left_wheel").GetComponent <WheelController> ();
        rightwheel          = transform.FindChild("right_wheel").GetComponent <WheelController> ();
        belt.speed          = currspeed;
        belt.friction       = friction;
        leftwheel.speed     = currspeed;
        leftwheel.friction  = friction;
        rightwheel.speed    = currspeed;
        rightwheel.friction = friction;
    }