SiliconGhetto Engine API
    Preparing search index...

    Function createWeatherAPI

    • Returns {
          get(): string;
          set(weather: string): void;
          isRaining(): boolean;
          isSnowing(): boolean;
          isThunder(): boolean;
          enableAuto(): void;
          disableAuto(): void;
          get auto(): boolean;
      }

      • get: function
        • Get the current weather type.

          Returns string

          Weather name: "clear", "rain", "snow", or "thunder"

      • set: function
        • Set the weather type.

          Parameters

          • weather: string

            Weather name: "clear", "rain", "snow", or "thunder"

          Returns void

      • isRaining: function
        • Check whether it is currently raining (includes thunderstorms).

          Returns boolean

          True if raining or thundering

      • isSnowing: function
        • Check whether it is currently snowing.

          Returns boolean

          True if snowing

      • isThunder: function
        • Check whether a thunderstorm is active.

          Returns boolean

          True if thundering

      • enableAuto: function
      • disableAuto: function
        • Disable automatic weather changes (weather stays fixed until manually changed).

          Returns void

      • get auto(): boolean

        Whether automatic weather changes are enabled.