From 89a557b82671cf961c8e4cb62f1df20198479d50 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Wed, 27 May 2020 16:56:18 -0700 Subject: [PATCH] save --- project.godot | 1 + scenes/Asteroid.tscn | 4 +++- scenes/{SellResourceItem.tscn => ShopItem.tscn} | 4 ++-- scenes/StationMenu.gd | 4 ++-- scenes/SellResourceItem.gd => scripts/ShopItem.gd | 0 scripts/Simulation.gd | 4 ++++ 6 files changed, 12 insertions(+), 5 deletions(-) rename scenes/{SellResourceItem.tscn => ShopItem.tscn} (94%) rename scenes/SellResourceItem.gd => scripts/ShopItem.gd (100%) create mode 100644 scripts/Simulation.gd diff --git a/project.godot b/project.godot index 5fefecd..f93ec7a 100644 --- a/project.godot +++ b/project.godot @@ -45,6 +45,7 @@ config/icon="res://assets/icon.png" [autoload] Constants="*res://scripts/utils/Constants.gd" +Simulation="*res://scripts/Simulation.gd" [input] diff --git a/scenes/Asteroid.tscn b/scenes/Asteroid.tscn index e29e97e..da70d77 100644 --- a/scenes/Asteroid.tscn +++ b/scenes/Asteroid.tscn @@ -27,7 +27,9 @@ points = PoolVector3Array( -0.771953, 1.00089, 0.702392, -0.713991, 1.01925, 0.7 [node name="Asteroid" type="RigidBody"] collision_layer = 5 -mass = 6000.0 +axis_lock_linear_x = true +axis_lock_linear_y = true +axis_lock_linear_z = true script = ExtResource( 2 ) [node name="MeshInstance" type="MeshInstance" parent="."] diff --git a/scenes/SellResourceItem.tscn b/scenes/ShopItem.tscn similarity index 94% rename from scenes/SellResourceItem.tscn rename to scenes/ShopItem.tscn index 48ae396..5325c9d 100644 --- a/scenes/SellResourceItem.tscn +++ b/scenes/ShopItem.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=2 format=2] -[ext_resource path="res://scenes/SellResourceItem.gd" type="Script" id=1] +[ext_resource path="res://scripts/ShopItem.gd" type="Script" id=1] -[node name="SellResourceItem" type="HBoxContainer"] +[node name="ShopItem" type="HBoxContainer"] anchor_top = 0.5 anchor_right = 1.0 anchor_bottom = 0.5 diff --git a/scenes/StationMenu.gd b/scenes/StationMenu.gd index 7f84cb4..972aa27 100644 --- a/scenes/StationMenu.gd +++ b/scenes/StationMenu.gd @@ -5,7 +5,7 @@ signal undock var current_player = null var current_station = null -var SellResourceItem = preload("res://scenes/SellResourceItem.tscn") +var ShopItem = preload("res://scenes/ShopItem.tscn") func set_player(player): current_player = player @@ -22,7 +22,7 @@ func reset_sell_tab(): # Add new children var cargo = current_player.cargo for resource_type in cargo: - var item = SellResourceItem.instance() + var item = ShopItem.instance() item.set_resource(resource_type, cargo[resource_type], 10) $TabContainer/Sell/Scroll/List.add_child(item) diff --git a/scenes/SellResourceItem.gd b/scripts/ShopItem.gd similarity index 100% rename from scenes/SellResourceItem.gd rename to scripts/ShopItem.gd diff --git a/scripts/Simulation.gd b/scripts/Simulation.gd new file mode 100644 index 0000000..9d9b796 --- /dev/null +++ b/scripts/Simulation.gd @@ -0,0 +1,4 @@ +extends Node + +func _process(delta): + pass