Пример #1
0
        private bool CheckPlayerInReform()
        {
            PlanetData localPlanet = GameMain.galaxy.PlanetById(localPlanetId);
            bool       result      = false;

            if (localPlanet != null)
            {
                PlanetFactory factory = localPlanet.factory;
                if (factory != null)
                {
                    PlatformSystem platformSystem = factory.platformSystem;
                    if (platformSystem.reformData != null)
                    {
                        int reformIndexForPosition = platformSystem.GetReformIndexForPosition(rootTransform.position);
                        if (reformIndexForPosition > -1)
                        {
                            int reformType = platformSystem.GetReformType(reformIndexForPosition);
                            result = platformSystem.IsTerrainMapping(reformType);
                        }
                        else
                        {
                            result = true;
                        }
                    }
                    else
                    {
                        result = false;
                    }
                }
            }
            return(result);
        }