mirror of
https://github.com/kristoferssolo/FuncIt.git
synced 2026-03-22 00:26:23 +00:00
Fixed a typo
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
extends Position2D
|
||||
|
||||
var trajectories = {
|
||||
'line' : preload("res://source/entities/shooting/Line_Trajectory/Line_Barrel.tscn"),
|
||||
'sine' : preload("res://source/entities/shooting/Sine_Trajectory/Sine_Barrel.tscn"),
|
||||
'parab' : preload("res://source/entities/shooting/Parabolic_Trajectory/Parabolic_Barrel.tscn"),
|
||||
'hyper' : preload("res://source/entities/shooting/Hyperbolic_Trajectory/Hyperbolic_Barrel.tscn")
|
||||
}
|
||||
|
||||
|
||||
func equip_gun(gun_type:String):
|
||||
for gun in get_children(): #if there is gun remove it
|
||||
gun.queue_free()
|
||||
|
||||
var gun = trajectories[gun_type].instance()
|
||||
add_child(gun)
|
||||
|
||||
|
||||
|
||||
func _process(delta):
|
||||
look_at(get_global_mouse_position())
|
||||
if Input.is_action_just_pressed("line"):
|
||||
equip_gun('line')
|
||||
if Input.is_action_just_pressed("sine"):
|
||||
equip_gun('sine')
|
||||
if Input.is_action_just_pressed("parab"):
|
||||
equip_gun('parab')
|
||||
if Input.is_action_just_pressed("hyper"):
|
||||
equip_gun('hyper')
|
||||
pass
|
||||
@@ -1,26 +0,0 @@
|
||||
extends KinematicBody2D
|
||||
|
||||
export var speed = 400
|
||||
var movement = Vector2(0, 0)
|
||||
|
||||
#func shoot():
|
||||
#var b = env.instance()
|
||||
#get_parent().add_child(b)
|
||||
#b.global_transform = $Gun.global_transform
|
||||
|
||||
func get_input():
|
||||
movement = Vector2()
|
||||
if Input.is_action_pressed("ui_right"):
|
||||
movement.x += 10
|
||||
if Input.is_action_pressed("ui_left"):
|
||||
movement.x -= 10
|
||||
if Input.is_action_pressed("ui_down"):
|
||||
movement.y += 10
|
||||
if Input.is_action_pressed("ui_up"):
|
||||
movement.y -= 10
|
||||
#if Input.is_action_just_pressed("shoot"):
|
||||
#shoot()
|
||||
|
||||
func _physics_process(delta):
|
||||
get_input()
|
||||
position += movement.normalized() * speed * delta
|
||||
@@ -1,10 +0,0 @@
|
||||
extends KinematicBody2D
|
||||
|
||||
|
||||
var velocity = Vector2(1, 1)
|
||||
|
||||
func _process(delta):
|
||||
var collision = move_and_collide(velocity * delta)
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 28 KiB |
@@ -1,35 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/pixil-frame-0 (1).png-aa4fc3ac5779e5dd3e9b1e2bedd174f2.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://source/entities/shooting/script/pixil-frame-0 (1).png"
|
||||
dest_files=[ "res://.import/pixil-frame-0 (1).png-aa4fc3ac5779e5dd3e9b1e2bedd174f2.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=true
|
||||
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
|
||||
process/normal_map_invert_y=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
||||
Reference in New Issue
Block a user