示例#1
0
        void Start()
        {
            // link components

            // find the first active APC (there may be more than one)

            foreach (ArcadePhysicsController physics in
                     GetComponents <ArcadePhysicsController> ())
            {
                if (physics.enabled)
                {
                    this.physics = physics;
                    break;
                }
            }
        }
        void Start()
        {
            // link components

            lerper = GetComponent <LerpingPhysicsController> ();

            // find the first enabled player controller

            ArcadePhysicsController[] controllers = GetComponents <ArcadePhysicsController> ();
            foreach (ArcadePhysicsController controller in controllers)
            {
                if (controller.enabled)
                {
                    // found an enabled controller! let's track this one
                    block = controller;
                    break;
                }
            }
        }