claude godot 4 port
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
@tool
|
||||
extends TextureRect
|
||||
tool
|
||||
export(Constants.WEATHER) var weather = Constants.WEATHER.UNKNOWN setget set_weather
|
||||
|
||||
@export var weather: Constants.WEATHER = Constants.WEATHER.UNKNOWN:
|
||||
set = set_weather
|
||||
|
||||
const images := {
|
||||
Constants.WEATHER.CLOUDY: preload("res://assets/texture/weather_icons/weather3.png"),
|
||||
Constants.WEATHER.FOGGY: preload("res://assets/texture/weather_icons/weather7.png"),
|
||||
@@ -15,7 +18,7 @@ const images := {
|
||||
func _ready():
|
||||
set_weather(weather)
|
||||
|
||||
func set_weather(new:int):
|
||||
func set_weather(new: int):
|
||||
if !images.has(new):
|
||||
new = Constants.WEATHER.UNKNOWN
|
||||
weather = new
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
uid://baru883baoj8p
|
||||
@@ -1,13 +1,13 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
[gd_scene load_steps=3 format=3]
|
||||
|
||||
[ext_resource path="res://scenes/weather_display/weather_display.gd" type="Script" id=1]
|
||||
[ext_resource path="res://assets/texture/weather_icons/weather5.png" type="Texture" id=2]
|
||||
[ext_resource type="Script" path="res://scenes/weather_display/weather_display.gd" id="1"]
|
||||
[ext_resource type="Texture2D" path="res://assets/texture/weather_icons/weather5.png" id="2"]
|
||||
|
||||
[node name="weather_display" type="TextureRect"]
|
||||
margin_left = -26.0
|
||||
margin_top = 171.0
|
||||
margin_right = 454.0
|
||||
margin_bottom = 502.0
|
||||
texture = ExtResource( 2 )
|
||||
script = ExtResource( 1 )
|
||||
offset_left = -26.0
|
||||
offset_top = 171.0
|
||||
offset_right = 454.0
|
||||
offset_bottom = 502.0
|
||||
texture = ExtResource("2")
|
||||
script = ExtResource("1")
|
||||
weather = 5
|
||||
|
||||
Reference in New Issue
Block a user