I started an enemy
This commit is contained in:
		
							
								
								
									
										16
									
								
								Scenes/enemy.tscn
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								Scenes/enemy.tscn
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | |||||||
|  | [gd_scene load_steps=3 format=3 uid="uid://b5lnjonlf4i1b"] | ||||||
|  |  | ||||||
|  | [ext_resource type="Script" path="res://Scripts/Enemy.gd" id="1_xj62t"] | ||||||
|  |  | ||||||
|  | [sub_resource type="ImageTexture" id="ImageTexture_s1wwp"] | ||||||
|  |  | ||||||
|  | [node name="Enemy" type="Node2D"] | ||||||
|  | script = ExtResource("1_xj62t") | ||||||
|  |  | ||||||
|  | [node name="Sprite" type="Sprite2D" parent="."] | ||||||
|  | texture = SubResource("ImageTexture_s1wwp") | ||||||
|  |  | ||||||
|  | [node name="Atk_cooldown" type="Timer" parent="."] | ||||||
|  | autostart = true | ||||||
|  |  | ||||||
|  | [connection signal="timeout" from="Atk_cooldown" to="." method="_on_atk_cooldown_timeout"] | ||||||
							
								
								
									
										17
									
								
								Scripts/Enemy.gd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								Scripts/Enemy.gd
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,17 @@ | |||||||
|  | extends Node2D | ||||||
|  |  | ||||||
|  |  | ||||||
|  | # Called when the node enters the scene tree for the first time. | ||||||
|  | func _ready(): | ||||||
|  | 	pass # Replace with function body. | ||||||
|  |  | ||||||
|  |  | ||||||
|  | # Called every frame. 'delta' is the elapsed time since the previous frame. | ||||||
|  | func _process(delta): | ||||||
|  | 	pass | ||||||
|  |  | ||||||
|  | func _attack(): | ||||||
|  | 	pass | ||||||
|  |  | ||||||
|  | func _on_atk_cooldown_timeout(): | ||||||
|  | 	pass # Replace with function body. | ||||||
		Reference in New Issue
	
	Block a user