Ejemplo n.º 1
0
        // Check if the player is on the platform.
        public void SetPlayerOnPlatform(bool onPlatform)
        {
            playerOnPlatform = onPlatform;

            // If the platform is a sinking platform...
            if (PlatformTypeIs(PlatformTypes.Sinking) && sinking)
            {
                // Start or reset the timer based on the sinking variables for the platform.
                if (onPlatform)
                {
                    sinking.StartSinkTimer();
                }
                else
                {
                    sinking.ResetSinkTimer();
                }
            }
        }