[EDIT] multiplayer and collision
This commit is contained in:
parent
9af57aec86
commit
3aaf387ea0
|
Before Width: | Height: | Size: 158 B After Width: | Height: | Size: 158 B |
@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="StreamTexture"
|
type="StreamTexture"
|
||||||
path="res://.import/Placeholder.png-30ac785a3c5b1e5af09dc50b4f4296ca.stex"
|
path="res://.import/Placeholder.png-49bf37bd92ae8829617f2a8b0c22f53e.stex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://Placeholder.png"
|
source_file="res://Assets/Placeholder.png"
|
||||||
dest_files=[ "res://.import/Placeholder.png-30ac785a3c5b1e5af09dc50b4f4296ca.stex" ]
|
dest_files=[ "res://.import/Placeholder.png-49bf37bd92ae8829617f2a8b0c22f53e.stex" ]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
BIN
Assets/tileset.png
Normal file
BIN
Assets/tileset.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 48 KiB |
34
Assets/tileset.png.import
Normal file
34
Assets/tileset.png.import
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/tileset.png-06023f60f54ec986b75003a8d422612f.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Assets/tileset.png"
|
||||||
|
dest_files=[ "res://.import/tileset.png-06023f60f54ec986b75003a8d422612f.stex" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_mode=0
|
||||||
|
compress/bptc_ldr=0
|
||||||
|
compress/normal_map=0
|
||||||
|
flags/repeat=0
|
||||||
|
flags/filter=false
|
||||||
|
flags/mipmaps=false
|
||||||
|
flags/anisotropic=false
|
||||||
|
flags/srgb=2
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/HDR_as_SRGB=false
|
||||||
|
process/invert_color=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=false
|
||||||
|
svg/scale=1.0
|
||||||
@ -1,14 +1,14 @@
|
|||||||
[gd_scene load_steps=3 format=2]
|
[gd_scene load_steps=3 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://Placeholder.png" type="Texture" id=1]
|
[ext_resource path="res://Scripts/Clopinette.gd" type="Script" id=1]
|
||||||
[ext_resource path="res://Clopinette.gd" type="Script" id=2]
|
[ext_resource path="res://Assets/Placeholder.png" type="Texture" id=2]
|
||||||
|
|
||||||
[node name="Clopinette" type="Node2D"]
|
[node name="Clopinette" type="Node2D"]
|
||||||
position = Vector2( 458.947, 226.316 )
|
position = Vector2( 458.947, 226.316 )
|
||||||
script = ExtResource( 2 )
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
[node name="Sprite" type="Sprite" parent="."]
|
[node name="Sprite" type="Sprite" parent="."]
|
||||||
texture = ExtResource( 1 )
|
texture = ExtResource( 2 )
|
||||||
|
|
||||||
[node name="Area2D" type="Area2D" parent="."]
|
[node name="Area2D" type="Area2D" parent="."]
|
||||||
|
|
||||||
@ -1,10 +1,17 @@
|
|||||||
[gd_scene load_steps=3 format=2]
|
[gd_scene load_steps=4 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://Placeholder.png" type="Texture" id=1]
|
[ext_resource path="res://Assets/Placeholder.png" type="Texture" id=1]
|
||||||
[ext_resource path="res://Scripts/Player.gd" type="Script" id=2]
|
[ext_resource path="res://Scripts/Player.gd" type="Script" id=2]
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id=1]
|
||||||
|
extents = Vector2( 16.1674, 5.57349 )
|
||||||
|
|
||||||
[node name="KinematicBody2D" type="KinematicBody2D"]
|
[node name="KinematicBody2D" type="KinematicBody2D"]
|
||||||
script = ExtResource( 2 )
|
script = ExtResource( 2 )
|
||||||
|
|
||||||
[node name="Sprite" type="Sprite" parent="."]
|
[node name="Sprite" type="Sprite" parent="."]
|
||||||
texture = ExtResource( 1 )
|
texture = ExtResource( 1 )
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
|
position = Vector2( 0, 10.3147 )
|
||||||
|
shape = SubResource( 1 )
|
||||||
|
|||||||
@ -1,8 +1,27 @@
|
|||||||
[gd_scene load_steps=2 format=2]
|
[gd_scene load_steps=4 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://Scene/Player.tscn" type="PackedScene" id=1]
|
[ext_resource path="res://Scene/Player.tscn" type="PackedScene" id=1]
|
||||||
|
[ext_resource path="res://Assets/Placeholder.png" type="Texture" id=2]
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id=1]
|
||||||
|
extents = Vector2( 15.6178, 15.7669 )
|
||||||
|
|
||||||
[node name="World" type="Node2D"]
|
[node name="World" type="Node2D"]
|
||||||
|
|
||||||
[node name="KinematicBody2D" parent="." instance=ExtResource( 1 )]
|
[node name="Player1" parent="." instance=ExtResource( 1 )]
|
||||||
position = Vector2( 121.087, 85.6409 )
|
position = Vector2( 119.977, 88.9695 )
|
||||||
|
|
||||||
|
[node name="obstacle" type="StaticBody2D" parent="."]
|
||||||
|
position = Vector2( 57.697, 87.6551 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_group_": true
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Sprite" type="Sprite" parent="obstacle"]
|
||||||
|
texture = ExtResource( 2 )
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="obstacle"]
|
||||||
|
shape = SubResource( 1 )
|
||||||
|
|
||||||
|
[node name="Player2" parent="." instance=ExtResource( 1 )]
|
||||||
|
position = Vector2( 221.278, 126.847 )
|
||||||
|
|||||||
@ -13,8 +13,12 @@ var vel = Vector2.ZERO
|
|||||||
func _physics_process(delta):
|
func _physics_process(delta):
|
||||||
var input_vector = Vector2.ZERO
|
var input_vector = Vector2.ZERO
|
||||||
|
|
||||||
input_vector.x = Input.get_action_strength("ui_right") - Input.get_action_strength("ui_left")
|
if self.name == "Player1":
|
||||||
input_vector.y = Input.get_action_strength("ui_down") - Input.get_action_strength("ui_up")
|
input_vector.x = Input.get_action_strength("ui_right") - Input.get_action_strength("ui_left")
|
||||||
|
input_vector.y = Input.get_action_strength("ui_down") - Input.get_action_strength("ui_up")
|
||||||
|
elif self.name == "Player2":
|
||||||
|
input_vector.x = Input.get_action_strength("ui_right2") - Input.get_action_strength("ui_left2")
|
||||||
|
input_vector.y = Input.get_action_strength("ui_down2") - Input.get_action_strength("ui_up2")
|
||||||
|
|
||||||
input_vector = input_vector.normalized()
|
input_vector = input_vector.normalized()
|
||||||
|
|
||||||
|
|||||||
@ -51,6 +51,29 @@ texture={
|
|||||||
"svg/scale": 1.0
|
"svg/scale": 1.0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[input]
|
||||||
|
|
||||||
|
ui_right2={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
ui_left2={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":81,"unicode":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
ui_up2={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":90,"unicode":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
ui_down2={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
[rendering]
|
[rendering]
|
||||||
|
|
||||||
quality/driver/driver_name="GLES2"
|
quality/driver/driver_name="GLES2"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user