Коммит e09ea561 создал по автору magcourier's avatar magcourier
Просмотр файлов

Merge branch 'develop' into 'develop'

#118 подписка на разные категории и порядок в косм

See merge request tehnokom/universo!170
владельцы 84c61e6a cc5eea4a
[gd_scene load_steps=2 format=2]
[ext_resource path="res://blokoj/kosmosxipoj/scenoj/baseSpaceship/base_spaceship.glb" type="PackedScene" id=1]
[node name="base_spaceship" instance=ExtResource( 1 )]
transform = Transform( 0.0421547, 0, 0.999111, 0, 1, 0, -0.999111, 0, 0.0421547, -4.94304, -1.94312, 12.5016 )
[node name="cabine" parent="." index="1"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 11.023, 3.98846, 5.05208 )
[gd_scene load_steps=5 format=2]
[ext_resource path="res://blokoj/kosmo/resursoj/untitled.obj" type="ArrayMesh" id=1]
[ext_resource path="res://blokoj/kosmo/skriptoj/ship.gd" type="Script" id=2]
[ext_resource path="res://blokoj/kosmo/scenoj/base_spaceship.tscn" type="PackedScene" id=3]
[sub_resource type="CapsuleShape" id=1]
radius = 3.29615
height = 9.14674
[node name="ship" type="KinematicBody"]
script = ExtResource( 2 )
[node name="CollisionShape" type="CollisionShape" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.06553, 5.3188 )
shape = SubResource( 1 )
[node name="mesh" type="MeshInstance" parent="CollisionShape"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.474594, -5.6999 )
visible = false
mesh = ExtResource( 1 )
material/0 = null
material/1 = null
material/2 = null
material/3 = null
material/4 = null
[node name="base_spaceship" parent="CollisionShape" instance=ExtResource( 3 )]
transform = Transform( -0.0034731, 0, 0.999994, 0, 1, 0, -0.999994, 0, -0.0034731, -4.98877, -3.8979, 6.84284 )
[gd_scene load_steps=13 format=2]
[gd_scene load_steps=8 format=2]
[ext_resource path="res://blokoj/kosmo/scenoj/space_object.tscn" type="PackedScene" id=3]
[ext_resource path="res://blokoj/kosmo/scenoj/main_camera.tscn" type="PackedScene" id=4]
[ext_resource path="res://blokoj/kosmo/scenoj/star.tscn" type="PackedScene" id=5]
[ext_resource path="res://blokoj/kosmo/skriptoj/space_ui.gd" type="Script" id=6]
......@@ -8,25 +7,7 @@
[ext_resource path="res://blokoj/kosmo/skriptoj/space.gd" type="Script" id=8]
[ext_resource path="res://blokoj/kosmo/scenoj/control.tscn" type="PackedScene" id=9]
[sub_resource type="SphereMesh" id=1]
radial_segments = 4
rings = 4
[sub_resource type="OpenSimplexNoise" id=2]
[sub_resource type="NoiseTexture" id=3]
noise = SubResource( 2 )
[sub_resource type="SpatialMaterial" id=4]
albedo_color = Color( 0.447059, 0.294118, 0.294118, 1 )
depth_enabled = true
depth_scale = 6.59
depth_deep_parallax = false
depth_flip_tangent = false
depth_flip_binormal = false
depth_texture = SubResource( 3 )
[sub_resource type="Animation" id=5]
[sub_resource type="Animation" id=1]
resource_name = "open_scene"
length = 2.0
tracks/0/type = "method"
......@@ -92,50 +73,6 @@ script = ExtResource( 7 )
[node name="http_finado" type="HTTPRequest" parent="."]
[node name="asteroid" type="MeshInstance" parent="."]
transform = Transform( 5, 0, 0, 0, 5, 0, 0, 0, 5, 82.0017, 0, 4.63756 )
mesh = SubResource( 1 )
material/0 = SubResource( 4 )
[node name="asteroid2" type="MeshInstance" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -79.6439, 0, 4.63756 )
mesh = SubResource( 1 )
material/0 = SubResource( 4 )
[node name="asteroid3" type="MeshInstance" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -95.5832 )
mesh = SubResource( 1 )
material/0 = SubResource( 4 )
[node name="asteroid4" type="MeshInstance" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -8.28443, 0, 52.5846 )
mesh = SubResource( 1 )
material/0 = SubResource( 4 )
[node name="asteroid5" type="MeshInstance" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 57.2536, 0, 4.63756 )
mesh = SubResource( 1 )
material/0 = SubResource( 4 )
[node name="asteroid6" type="MeshInstance" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -63.982, 8.33743, -28.9217 )
mesh = SubResource( 1 )
material/0 = SubResource( 4 )
[node name="asteroid7" type="MeshInstance" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -9.74345, 60.5021 )
mesh = SubResource( 1 )
material/0 = SubResource( 4 )
[node name="asteroid8" type="MeshInstance" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -78.8565, 6.63192, 14.2732 )
mesh = SubResource( 1 )
material/0 = SubResource( 4 )
[node name="space_object1" parent="." instance=ExtResource( 3 )]
transform = Transform( 10, 0, 0, 0, 10, 0, 0, 0, 10, -163.333, 10.0102, 3.27841 )
visible = false
[node name="camera" parent="." instance=ExtResource( 4 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 151.894 )
distance_min = 0
......@@ -165,7 +102,7 @@ __meta__ = {
}
[node name="AnimationPlayer" type="AnimationPlayer" parent="ui"]
anims/open_scene = SubResource( 5 )
anims/open_scene = SubResource( 1 )
[connection signal="load_objektoj" from="." to="." method="_on_space_load_objektoj"]
[connection signal="tree_exiting" from="." to="." method="_on_space_tree_exiting"]
[connection signal="request_completed" from="http_mutate" to="http_mutate" method="_on_http_mutate_request_completed"]
......
[gd_scene load_steps=4 format=2]
[ext_resource path="res://blokoj/kosmo/resursoj/violet_frame.png" type="Texture" id=1]
[ext_resource path="res://blokoj/kosmo/skriptoj/way_point.gd" type="Script" id=2]
[sub_resource type="SphereShape" id=1]
[node name="way_point" type="Spatial"]
script = ExtResource( 2 )
[node name="VisibilityNotifier" type="VisibilityNotifier" parent="."]
[node name="TextureRect" type="TextureRect" parent="."]
visible = false
margin_left = -25.0
margin_top = -25.0
margin_right = 25.0
margin_bottom = 25.0
texture = ExtResource( 1 )
expand = true
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Area" type="Area" parent="."]
[node name="CollisionShape" type="CollisionShape" parent="Area"]
shape = SubResource( 1 )
[connection signal="camera_entered" from="VisibilityNotifier" to="." method="_on_VisibilityNotifier_camera_entered"]
[connection signal="camera_exited" from="VisibilityNotifier" to="." method="_on_VisibilityNotifier_camera_exited"]
[connection signal="body_entered" from="Area" to="." method="_on_Area_body_entered"]
......@@ -143,6 +143,7 @@ func _on_PopupMenu_index_pressed(index):
celo.z,
Transform(Basis.IDENTITY, celo),
dist,
Net.kategorio_movado
Net.kategorio_movado,
-1 #pozicio
)
......@@ -239,8 +239,8 @@ func kubo_json(id=0):
return JSON.print({
'type': 'start',
'id': '%s' % id,
'payload':{ 'query': 'subscription ($kuboj:[Int]!, $realeco:Int!, $kategorio:Int!)'+
'{ universoObjektoEventoj (kuboj: $kuboj, realeco:$realeco, kategorio: $kategorio) { evento '+
'payload':{ 'query': 'subscription ($kuboj:[Int]!, $realeco:Int!)'+
'{ universoObjektoEventoj (kuboj: $kuboj, realeco:$realeco) { evento '+
' objekto { uuid koordinatoX koordinatoY koordinatoZ} '+
' projekto {uuid kategorio {edges {node {objId }}}} '+
' tasko { uuid komKoordinatoX komKoordinatoY '+
......@@ -249,6 +249,6 @@ func kubo_json(id=0):
' finKoordinatoZ pozicio statuso{objId} kategorio { '+
' edges { node { objId } } }} } '+
'}',
'variables': {"kuboj": Global.kubo, "realeco": Global.realeco, "kategorio":kategorio } }})
'variables': {"kuboj": Global.kubo, "realeco": Global.realeco } }})
......@@ -229,30 +229,6 @@ func _on_space_load_objektoj():
# добавляем маршрут движения
projektoj = item['projekto']['edges']
analizo.analizo_projekto(projektoj,s,s)
# if len(projektoj)==1:
# s.projekto_itineroj_uuid=projektoj.front()['node']['uuid']
# #заполняем маршрут
# for tasko in projektoj[0]['node']['tasko']['edges']:
# if tasko['node']['statuso']['objId']==2:#задачу, которая "В работе" ставим первой
# s.itineroj.push_front({
# 'uuid':tasko['node']['uuid'],
# 'koordinatoX':tasko['node']['finKoordinatoX'],
# 'koordinatoY':tasko['node']['finKoordinatoY'],
# 'koordinatoZ':tasko['node']['finKoordinatoZ'],
# 'pozicio': tasko['node']['pozicio']
# })
# break;
# for tasko in projektoj[0]['node']['tasko']['edges']:
# if tasko['node']['statuso']['objId']==1:# добавляем остальные задачи
# # необходимо добавлять в порядке слодования задач
# s.itineroj.push_back({
# 'uuid':tasko['node']['uuid'],
# 'koordinatoX':tasko['node']['finKoordinatoX'],
# 'koordinatoY':tasko['node']['finKoordinatoY'],
# 'koordinatoZ':tasko['node']['finKoordinatoZ'],
# 'pozicio': tasko['node']['pozicio']
# })
# s.set_route(s.itineroj.duplicate())
add_child(s)
s.add_to_group('create')
s.add_to_group('enemies')
......
......@@ -4,7 +4,9 @@ const QueryObject = preload("queries.gd")
func _ready():
Title.connect("load_objekto", self, "_reload_objekto")
var err = Title.connect("load_objekto", self, "_reload_objekto")
if err:
print('ошибка установки реакции на load_objekto = ',err)
# перезагружаем список объектов
func _reload_objekto():
......
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать