Asteroids, fonts
This commit is contained in:
parent
44b8a3ef8c
commit
ad7c280c24
8 changed files with 118 additions and 4 deletions
BIN
fonts/Doto.ttf
Normal file
BIN
fonts/Doto.ttf
Normal file
Binary file not shown.
36
fonts/Doto.ttf.import
Normal file
36
fonts/Doto.ttf.import
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="font_data_dynamic"
|
||||||
|
type="FontFile"
|
||||||
|
uid="uid://donsvh2l775rb"
|
||||||
|
path="res://.godot/imported/Doto.ttf-3228f40091ab5ffe98c98dbbab781835.fontdata"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://fonts/Doto.ttf"
|
||||||
|
dest_files=["res://.godot/imported/Doto.ttf-3228f40091ab5ffe98c98dbbab781835.fontdata"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
Rendering=null
|
||||||
|
antialiasing=1
|
||||||
|
generate_mipmaps=false
|
||||||
|
disable_embedded_bitmaps=true
|
||||||
|
multichannel_signed_distance_field=false
|
||||||
|
msdf_pixel_range=8
|
||||||
|
msdf_size=48
|
||||||
|
allow_system_fallback=true
|
||||||
|
force_autohinter=false
|
||||||
|
modulate_color_glyphs=false
|
||||||
|
hinting=1
|
||||||
|
subpixel_positioning=4
|
||||||
|
keep_rounding_remainders=true
|
||||||
|
oversampling=0.0
|
||||||
|
Fallbacks=null
|
||||||
|
fallbacks=[]
|
||||||
|
Compress=null
|
||||||
|
compress=true
|
||||||
|
preload=[]
|
||||||
|
language_support={}
|
||||||
|
script_support={}
|
||||||
|
opentype_features={}
|
||||||
BIN
fonts/Michroma.ttf
Normal file
BIN
fonts/Michroma.ttf
Normal file
Binary file not shown.
36
fonts/Michroma.ttf.import
Normal file
36
fonts/Michroma.ttf.import
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="font_data_dynamic"
|
||||||
|
type="FontFile"
|
||||||
|
uid="uid://n1nd5m2kwexu"
|
||||||
|
path="res://.godot/imported/Michroma.ttf-f6ea4707f12da5f181eaf7929c9c9384.fontdata"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://fonts/Michroma.ttf"
|
||||||
|
dest_files=["res://.godot/imported/Michroma.ttf-f6ea4707f12da5f181eaf7929c9c9384.fontdata"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
Rendering=null
|
||||||
|
antialiasing=1
|
||||||
|
generate_mipmaps=false
|
||||||
|
disable_embedded_bitmaps=true
|
||||||
|
multichannel_signed_distance_field=false
|
||||||
|
msdf_pixel_range=8
|
||||||
|
msdf_size=48
|
||||||
|
allow_system_fallback=true
|
||||||
|
force_autohinter=false
|
||||||
|
modulate_color_glyphs=false
|
||||||
|
hinting=1
|
||||||
|
subpixel_positioning=4
|
||||||
|
keep_rounding_remainders=true
|
||||||
|
oversampling=0.0
|
||||||
|
Fallbacks=null
|
||||||
|
fallbacks=[]
|
||||||
|
Compress=null
|
||||||
|
compress=true
|
||||||
|
preload=[]
|
||||||
|
language_support={}
|
||||||
|
script_support={}
|
||||||
|
opentype_features={}
|
||||||
|
|
@ -13,6 +13,7 @@ config_version=5
|
||||||
config/name="Super Space Game"
|
config/name="Super Space Game"
|
||||||
run/main_scene="uid://bauklhpieuivd"
|
run/main_scene="uid://bauklhpieuivd"
|
||||||
config/features=PackedStringArray("4.5", "Mobile")
|
config/features=PackedStringArray("4.5", "Mobile")
|
||||||
|
boot_splash/bg_color=Color(0, 0, 0, 1)
|
||||||
config/icon="res://icon.svg"
|
config/icon="res://icon.svg"
|
||||||
|
|
||||||
[display]
|
[display]
|
||||||
|
|
@ -25,6 +26,10 @@ window/stretch/scale_mode="integer"
|
||||||
|
|
||||||
enabled=PackedStringArray("res://addons/godot_super-wakatime/plugin.cfg")
|
enabled=PackedStringArray("res://addons/godot_super-wakatime/plugin.cfg")
|
||||||
|
|
||||||
|
[gui]
|
||||||
|
|
||||||
|
theme/custom_font="uid://n1nd5m2kwexu"
|
||||||
|
|
||||||
[input]
|
[input]
|
||||||
|
|
||||||
turn_left={
|
turn_left={
|
||||||
|
|
|
||||||
16
scenes/asteroid.tscn
Normal file
16
scenes/asteroid.tscn
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
[gd_scene load_steps=3 format=3 uid="uid://dgng5vdhn6anc"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://co67k1hqadpv4" path="res://textures/asteroid_small.png" id="1_akfqu"]
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id="CircleShape2D_uwrxv"]
|
||||||
|
radius = 16.0
|
||||||
|
|
||||||
|
[node name="Asteroid" type="RigidBody2D"]
|
||||||
|
mass = 2.5
|
||||||
|
linear_damp = 4.0
|
||||||
|
|
||||||
|
[node name="Sprite" type="Sprite2D" parent="."]
|
||||||
|
texture = ExtResource("1_akfqu")
|
||||||
|
|
||||||
|
[node name="CollisionShape" type="CollisionShape2D" parent="."]
|
||||||
|
shape = SubResource("CircleShape2D_uwrxv")
|
||||||
|
|
@ -1,11 +1,15 @@
|
||||||
[gd_scene load_steps=4 format=3 uid="uid://bauklhpieuivd"]
|
[gd_scene load_steps=6 format=3 uid="uid://bauklhpieuivd"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://dtwo7g0ipc4k" path="res://textures/ship_1.png" id="1_uwrxv"]
|
[ext_resource type="Texture2D" uid="uid://dtwo7g0ipc4k" path="res://textures/ship_1.png" id="1_uwrxv"]
|
||||||
[ext_resource type="Script" uid="uid://bfxfkrkaebxk0" path="res://scripts/player.gd" id="1_yqjtg"]
|
[ext_resource type="Script" uid="uid://bfxfkrkaebxk0" path="res://scripts/player.gd" id="1_yqjtg"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://dgng5vdhn6anc" path="res://scenes/asteroid.tscn" id="3_lnu2h"]
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_uwrxv"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_uwrxv"]
|
||||||
radius = 16.0
|
radius = 16.0
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id="CircleShape2D_lnu2h"]
|
||||||
|
radius = 20.0
|
||||||
|
|
||||||
[node name="Game" type="Node2D"]
|
[node name="Game" type="Node2D"]
|
||||||
|
|
||||||
[node name="Player" type="RigidBody2D" parent="."]
|
[node name="Player" type="RigidBody2D" parent="."]
|
||||||
|
|
@ -15,7 +19,7 @@ script = ExtResource("1_yqjtg")
|
||||||
[node name="Sprite" type="Sprite2D" parent="Player"]
|
[node name="Sprite" type="Sprite2D" parent="Player"]
|
||||||
texture = ExtResource("1_uwrxv")
|
texture = ExtResource("1_uwrxv")
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Player"]
|
[node name="CollisionShape" type="CollisionShape2D" parent="Player"]
|
||||||
shape = SubResource("CircleShape2D_uwrxv")
|
shape = SubResource("CircleShape2D_uwrxv")
|
||||||
|
|
||||||
[node name="Camera2D" type="Camera2D" parent="Player"]
|
[node name="Camera2D" type="Camera2D" parent="Player"]
|
||||||
|
|
@ -25,4 +29,20 @@ position_smoothing_speed = 8.0
|
||||||
rotation_smoothing_enabled = true
|
rotation_smoothing_enabled = true
|
||||||
rotation_smoothing_speed = 15.0
|
rotation_smoothing_speed = 15.0
|
||||||
|
|
||||||
[node name="RigidBody2D" type="RigidBody2D" parent="."]
|
[node name="Hitbox" type="Area2D" parent="Player"]
|
||||||
|
|
||||||
|
[node name="CollisionShape" type="CollisionShape2D" parent="Player/Hitbox"]
|
||||||
|
shape = SubResource("CircleShape2D_lnu2h")
|
||||||
|
debug_color = Color(0.9686392, 0, 0.4696517, 0.41960785)
|
||||||
|
|
||||||
|
[node name="Asteroid" parent="." instance=ExtResource("3_lnu2h")]
|
||||||
|
position = Vector2(-42, -173)
|
||||||
|
|
||||||
|
[node name="Asteroid2" parent="." instance=ExtResource("3_lnu2h")]
|
||||||
|
position = Vector2(227, 37)
|
||||||
|
|
||||||
|
[node name="Asteroid3" parent="." instance=ExtResource("3_lnu2h")]
|
||||||
|
position = Vector2(-216, 134)
|
||||||
|
|
||||||
|
[node name="Asteroid4" parent="." instance=ExtResource("3_lnu2h")]
|
||||||
|
position = Vector2(-192, -427)
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
extends RigidBody2D
|
extends RigidBody2D
|
||||||
|
|
||||||
var health = 1000
|
var health = 1000
|
||||||
|
var time_since_last_collision = 0
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
func _physics_process(delta: float) -> void:
|
||||||
var axis = Input.get_axis("turn_left", "turn_right")
|
var axis = Input.get_axis("turn_left", "turn_right")
|
||||||
|
|
||||||
angular_velocity = deg_to_rad(180 * axis)
|
angular_velocity = deg_to_rad(180 * axis)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue