prototype
This commit is contained in:
8
godot/characters/player/Player.gdns
Normal file
8
godot/characters/player/Player.gdns
Normal file
@@ -0,0 +1,8 @@
|
||||
[gd_resource type="NativeScript" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://gdnative/libjuego.tres" type="GDNativeLibrary" id=1]
|
||||
|
||||
[resource]
|
||||
resource_name = "Player"
|
||||
class_name = "Player"
|
||||
library = ExtResource( 1 )
|
22
godot/characters/player/Player.tscn
Normal file
22
godot/characters/player/Player.tscn
Normal file
@@ -0,0 +1,22 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://characters/player/sprites/green.tres" type="SpriteFrames" id=1]
|
||||
[ext_resource path="res://characters/player/Player.gdns" type="Script" id=2]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=1]
|
||||
radius = 6.0
|
||||
height = 12.0
|
||||
|
||||
[node name="Player" type="KinematicBody2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
frames = ExtResource( 1 )
|
||||
animation = "idle"
|
||||
centered = false
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( 12, 12 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[connection signal="player_moved" from="." to="." method="_on_Player_player_moved"]
|
37
godot/characters/player/sprites/beige.tres
Normal file
37
godot/characters/player/sprites/beige.tres
Normal file
@@ -0,0 +1,37 @@
|
||||
[gd_resource type="SpriteFrames" load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://assets/characters/characters.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=1]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 24, 24, 24 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 24, 24, 24, 24 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=4]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 24, 24, 24, 24 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=3]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 24, 24, 24 )
|
||||
|
||||
[resource]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 1 ) ],
|
||||
"loop": true,
|
||||
"name": "idle",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ SubResource( 2 ) ],
|
||||
"loop": true,
|
||||
"name": "air",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ SubResource( 4 ), SubResource( 3 ) ],
|
||||
"loop": true,
|
||||
"name": "move",
|
||||
"speed": 3.0
|
||||
} ]
|
37
godot/characters/player/sprites/blue.tres
Normal file
37
godot/characters/player/sprites/blue.tres
Normal file
@@ -0,0 +1,37 @@
|
||||
[gd_resource type="SpriteFrames" load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://assets/characters/characters.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=5]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 48, 0, 24, 24 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=4]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 72, 0, 24, 24 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=7]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 72, 0, 24, 24 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=6]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 48, 0, 24, 24 )
|
||||
|
||||
[resource]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 5 ) ],
|
||||
"loop": true,
|
||||
"name": "idle",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ SubResource( 4 ) ],
|
||||
"loop": true,
|
||||
"name": "air",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ SubResource( 7 ), SubResource( 6 ) ],
|
||||
"loop": true,
|
||||
"name": "move",
|
||||
"speed": 3.0
|
||||
} ]
|
37
godot/characters/player/sprites/green.tres
Normal file
37
godot/characters/player/sprites/green.tres
Normal file
@@ -0,0 +1,37 @@
|
||||
[gd_resource type="SpriteFrames" load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://assets/characters/characters.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=3]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 0, 24, 24 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=4]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 24, 0, 24, 24 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 24, 0, 24, 24 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=1]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 0, 24, 24 )
|
||||
|
||||
[resource]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 3 ) ],
|
||||
"loop": true,
|
||||
"name": "idle",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ SubResource( 4 ) ],
|
||||
"loop": true,
|
||||
"name": "air",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ SubResource( 2 ), SubResource( 1 ) ],
|
||||
"loop": true,
|
||||
"name": "move",
|
||||
"speed": 3.0
|
||||
} ]
|
37
godot/characters/player/sprites/pink.tres
Normal file
37
godot/characters/player/sprites/pink.tres
Normal file
@@ -0,0 +1,37 @@
|
||||
[gd_resource type="SpriteFrames" load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://assets/characters/characters.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=1]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 96, 0, 24, 24 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 120, 0, 24, 24 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=4]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 120, 0, 24, 24 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=3]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 96, 0, 24, 24 )
|
||||
|
||||
[resource]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 1 ) ],
|
||||
"loop": true,
|
||||
"name": "idle",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ SubResource( 2 ) ],
|
||||
"loop": true,
|
||||
"name": "air",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ SubResource( 4 ), SubResource( 3 ) ],
|
||||
"loop": true,
|
||||
"name": "move",
|
||||
"speed": 3.0
|
||||
} ]
|
37
godot/characters/player/sprites/yellow.tres
Normal file
37
godot/characters/player/sprites/yellow.tres
Normal file
@@ -0,0 +1,37 @@
|
||||
[gd_resource type="SpriteFrames" load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://assets/characters/characters.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="AtlasTexture" id=1]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 144, 0, 24, 24 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 168, 0, 24, 24 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=4]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 168, 0, 24, 24 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=3]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 144, 0, 24, 24 )
|
||||
|
||||
[resource]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 1 ) ],
|
||||
"loop": true,
|
||||
"name": "idle",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ SubResource( 2 ) ],
|
||||
"loop": true,
|
||||
"name": "air",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ SubResource( 4 ), SubResource( 3 ) ],
|
||||
"loop": true,
|
||||
"name": "move",
|
||||
"speed": 3.0
|
||||
} ]
|
Reference in New Issue
Block a user