cruddy enemy grunt ship sprite?

This commit is contained in:
Robin Hübner 2017-07-31 18:23:46 +02:00
parent 145f5b5794
commit 4dbf17fb46
9 changed files with 46 additions and 14 deletions

View File

@ -1,10 +1,16 @@
extends KinematicBody2D
var grunt_rot_speed = deg2rad(22.5) # degrees per second
func _ready():
var t = get_tree()
var r = t.get_root()
var n = r.get_node("Game/MinimapControl")
n.register_entity(self)
set_process(true)
func type():
return "EnemyGrunt"
func _process(delta):
rotate(grunt_rot_speed * delta)

View File

@ -1,13 +1,19 @@
[gd_scene load_steps=2 format=1]
[gd_scene load_steps=3 format=1]
[ext_resource path="res://EnemyGrunt.gd" type="Script" id=1]
[ext_resource path="res://raw/enemy_grunt.png" type="Texture" id=2]
[node name="EnemyGrunt" type="KinematicBody2D"]
transform/scale = Vector2( 2, 2 )
input/pickable = false
collision/layers = 1
collision/mask = 1
collision/margin = 0.08
script/script = ExtResource( 1 )
[node name="Sprite" type="Sprite" parent="."]
texture = ExtResource( 2 )

4
Game.gd Normal file
View File

@ -0,0 +1,4 @@
extends Node
func _ready():
pass

View File

@ -1,24 +1,28 @@
[gd_scene load_steps=6 format=1]
[gd_scene load_steps=8 format=1]
[ext_resource path="res://Minimap.tscn" type="PackedScene" id=1]
[ext_resource path="res://AsteroidSpawner.tscn" type="PackedScene" id=2]
[ext_resource path="res://PowerStation.tscn" type="PackedScene" id=3]
[ext_resource path="res://Player.tscn" type="PackedScene" id=4]
[ext_resource path="res://raw/space.png" type="Texture" id=5]
[ext_resource path="res://Game.gd" type="Script" id=1]
[ext_resource path="res://Minimap.tscn" type="PackedScene" id=2]
[ext_resource path="res://AsteroidSpawner.tscn" type="PackedScene" id=3]
[ext_resource path="res://PowerStation.tscn" type="PackedScene" id=4]
[ext_resource path="res://Player.tscn" type="PackedScene" id=5]
[ext_resource path="res://raw/space.png" type="Texture" id=6]
[ext_resource path="res://EnemyGrunt.tscn" type="PackedScene" id=7]
[node name="Game" type="Node"]
[node name="MinimapControl" parent="." instance=ExtResource( 1 )]
script/script = ExtResource( 1 )
[node name="AsteroidSpawner" parent="." instance=ExtResource( 2 )]
[node name="MinimapControl" parent="." instance=ExtResource( 2 )]
[node name="AsteroidSpawner" parent="." instance=ExtResource( 3 )]
[node name="PowerStations" type="Node" parent="."]
[node name="PowerStation" parent="PowerStations" instance=ExtResource( 3 )]
[node name="PowerStation" parent="PowerStations" instance=ExtResource( 4 )]
transform/pos = Vector2( 119.085, -182.303 )
[node name="Player" parent="." instance=ExtResource( 4 )]
[node name="Player" parent="." instance=ExtResource( 5 )]
transform/pos = Vector2( 92.7742, 71.7896 )
@ -44,7 +48,7 @@ motion/mirroring = Vector2( 0, 0 )
[node name="Sprite" type="Sprite" parent="ParallaxBackground/ParallaxLayer 2"]
texture = ExtResource( 5 )
texture = ExtResource( 6 )
region = true
region_rect = Rect2( 0, 0, 8192, 8192 )
@ -58,8 +62,12 @@ motion/mirroring = Vector2( 0, 0 )
[node name="Sprite" type="Sprite" parent="ParallaxBackground/ParallaxLayer"]
texture = ExtResource( 5 )
texture = ExtResource( 6 )
region = true
region_rect = Rect2( 0, 0, 8192, 8192 )
[node name="EnemyGrunt" parent="." instance=ExtResource( 7 )]
transform/pos = Vector2( 127.878, -20.3627 )

View File

@ -1 +1,2 @@
filter=false
gen_mipmaps=false

3
raw/enemy_grunt.ase Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f6e3a7b919b49e87d3da8417ad90062c3be75fd3b0a8ee7180c86f49a54f3c64
size 750

BIN
raw/enemy_grunt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 B

View File

@ -0,0 +1,3 @@
filter=false
gen_mipmaps=false
anisotropic=true

View File

@ -1 +1,2 @@
filter=false
gen_mipmaps=false