Exemplo n.º 1
0
        /// <summary>
        /// Execute this method every frame.
        /// </summary>
        private void FixedUpdate()
        {
            bool finished = settings.CustomMove(duration, speed, -Vector3.up);

            if (finished)
            {
                enabled = false;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Execute this method every frame.
        /// </summary>
        private void FixedUpdate()
        {
            bool finished = settings.CustomMove(duration, speed, Vector3.up);

            if (finished)
            {
                settings.rigidBody.isKinematic = false;
                settings.rigidBody.WakeUp();
                enabled = false;
            }
        }