Some more ProjectSettings fixes

This commit is contained in:
Rémi Verschelde
2017-07-26 20:25:57 +02:00
parent d62be914fd
commit 9365e97c0f
25 changed files with 82 additions and 99 deletions

View File

@@ -9,8 +9,8 @@ run/name=""
[display]
window/height=720
window/width=1080
window/size/height=720
window/size/width=1080
[rasterizer]

View File

@@ -1,20 +1,17 @@
config_version=3
config_version=null
[application]
config/name="Kinematic Character"
run/main_scene="res://colworld.tscn"
config/icon="res://icon.png"
config/main_scene="res://colworld.tscn"
run/main_scene="res://colworld.tscn"
[display]
stretch/aspect="keep"
stretch/mode="2d"
window/height=495
window/width=530
window/size/height=495
window/size/width=530
[input]

View File

@@ -3,9 +3,8 @@ config_version=3
[application]
config/name="Using Lights As Mask"
run/main_scene="res://lightmask.tscn"
config/icon="res://icon.png"
config/main_scene="res://lightmask.tscn"
run/main_scene="res://lightmask.tscn"
[rasterizer]

View File

@@ -3,16 +3,15 @@ config_version=3
[application]
config/name="2D Lighting"
run/main_scene="res://light_shadows.tscn"
config/icon="res://icon.png"
config/main_scene="res://light_shadows.tscn"
run/main_scene="res://light_shadows.tscn"
[display]
stretch/aspect="keep"
stretch/mode="2d"
window/height=600
window/width=800
window/size/height=600
window/size/width=800
[rasterizer]

View File

@@ -10,5 +10,5 @@ config/icon="res://icon.png"
stretch/aspect="keep"
stretch/mode="2d"
window/height=600
window/width=800
window/size/height=600
window/size/width=800

View File

@@ -12,8 +12,8 @@ name_es="Plataformero"
stretch/aspect="keep_height"
stretch/mode="2d"
window/height=480
window/width=800
window/size/height=480
window/size/width=800
[image_loader]

View File

@@ -4,6 +4,6 @@ extends RigidBody2D
func _on_bullet_body_enter( body ):
if (body.has_method("hit_by_bullet")):
body.call("hit_by_bullet")
func _on_Timer_timeout():
get_node("anim").play("shutdown")

View File

@@ -1,11 +1,11 @@
extends Area2D
var taken=false
func _on_coin_body_enter( body ):
if (not taken and body is preload("res://player.gd")):
get_node("anim").play("taken")
taken=true

View File

@@ -22,36 +22,36 @@ onready var detect_wall_right = get_node("detect_wall_right")
onready var sprite = get_node("sprite")
func _fixed_process(delta):
var new_anim="idle"
if (state==STATE_WALKING):
linear_velocity+= GRAVITY_VEC*delta
linear_velocity.x = direction * WALK_SPEED
linear_velocity = move_and_slide( linear_velocity, FLOOR_NORMAL )
if (not detect_floor_left.is_colliding() or detect_wall_left.is_colliding()):
direction=1.0
if (not detect_floor_right.is_colliding() or detect_wall_right.is_colliding()):
direction=-1.0
sprite.set_scale( Vector2(direction,1.0) )
new_anim="walk"
else:
new_anim="explode"
if (anim!=new_anim):
anim=new_anim
get_node("anim").play(anim)
func hit_by_bullet():
state=STATE_KILLED
state=STATE_KILLED
func _ready():
set_fixed_process(true)

View File

@@ -12,7 +12,7 @@ func _fixed_process(delta):
accum = fmod(accum, PI*2.0)
var d = sin(accum)
var xf = Transform2D()
xf[2]= motion*d
xf[2]= motion*d
get_node("platform").transform=xf

View File

@@ -12,7 +12,7 @@ const BULLET_VELOCITY = 1000
const SHOOT_TIME_SHOW_WEAPON = 0.2
var linear_vel = Vector2()
var onair_time = 0 #
var onair_time = 0 #
var on_floor = false
var shoot_time=99999 #time since last shot
@@ -22,68 +22,68 @@ var anim=""
onready var sprite = get_node("sprite")
func _fixed_process(delta):
#increment counters
onair_time+=delta
shoot_time+=delta
### MOVEMENT ###
# Apply Gravity
linear_vel += delta * GRAVITY_VEC
# Move and Slide
linear_vel = move_and_slide( linear_vel, FLOOR_NORMAL, SLOPE_SLIDE_STOP )
# Detect Floor
if (is_on_floor()):
onair_time=0
onair_time=0
on_floor = onair_time < MIN_ONAIR_TIME
### CONTROL ###
# Horizontal Movement
var target_speed = 0
if (Input.is_action_pressed("move_left")):
target_speed += -1
if (Input.is_action_pressed("move_right")):
target_speed += 1
target_speed *= WALK_SPEED
linear_vel.x = lerp( linear_vel.x, target_speed, 0.1 )
# Jumping
if (on_floor and Input.is_action_just_pressed("jump")):
linear_vel.y=-JUMP_SPEED
get_node("sound_jump").play()
# Shooting
# Shooting
if (Input.is_action_just_pressed("shoot")):
var bullet = preload("res://bullet.tscn").instance()
bullet.position = get_node("sprite/bullet_shoot").global_position #use node for shoot position
bullet.linear_velocity = Vector2( sprite.scale.x * BULLET_VELOCITY,0 )
bullet.linear_velocity = Vector2( sprite.scale.x * BULLET_VELOCITY,0 )
bullet.add_collision_exception_with(self) # don't want player to collide with bullet
get_parent().add_child( bullet ) #don't want bullet to move with me, so add it as child of parent
get_node("sound_shoot").play()
shoot_time=0
### ANIMATION ###
var new_anim="idle"
if (on_floor):
if (linear_vel.x < -SIDING_CHANGE_SPEED):
sprite.scale.x = -1
new_anim="run"
if (linear_vel.x > SIDING_CHANGE_SPEED):
sprite.scale.x = 1
new_anim="run"
else:
# We want the character to immediately change facing side when the player
# tries to change direction, during air control.
@@ -97,15 +97,15 @@ func _fixed_process(delta):
new_anim="jumping"
else:
new_anim="falling"
if (shoot_time < SHOOT_TIME_SHOW_WEAPON):
new_anim+="_weapon"
if (new_anim!=anim):
anim=new_anim
get_node("anim").play(anim)
func _ready():
set_fixed_process(true)

View File

@@ -3,17 +3,16 @@ config_version=3
[application]
config/name="Platformer"
run/main_scene="res://stage.tscn"
config/icon="res://icon.png"
name_es="Plataformero"
run/main_scene="res://stage.tscn"
target_fps="60"
[display]
stretch/aspect="keep_height"
stretch/mode="2d"
window/height=480
window/width=800
window/size/height=480
window/size/width=800
[image_loader]

View File

@@ -9,8 +9,8 @@ config/icon="res://icon.png"
[display]
stretch_2d=true
window/height=400
window/width=640
window/size/height=400
window/size/width=640
[input]

View File

@@ -10,5 +10,5 @@ config/icon="res://icon.png"
stretch/aspect="keep"
stretch/mode="2d"
window/height=600
window/width=800
window/size/height=600
window/size/width=800

View File

@@ -1,12 +1,10 @@
config_version=3
config_version=null
[application]
config/name="Kinematic Character 3D"
run/main_scene="res://level.scn"
config/icon="res://kinebody3d.png"
run/main_scene="res://level.scn"
[input]

View File

@@ -1,10 +1,9 @@
config_version=3
config_version=null
[application]
config/name="Platformer 3D"
config/icon="res://icon.png"
run/main_scene="res://stage.scn"
[input]

View File

@@ -11,8 +11,8 @@ name="Input Mapping GUI"
[display]
window/height=480
window/width=640
window/size/height=480
window/size/width=640
[input]

View File

@@ -1,12 +1,10 @@
config_version=3
config_version=null
[application]
config/name="Rich Text Label (BBCode)"
run/main_scene="res://rich_text_bbcode.tscn"
config/icon="res://icon.png"
run/main_scene="res://rich_text_bbcode.tscn"
[memory]

View File

@@ -1,7 +1,5 @@
config_version=3
config_version=null
[application]
config/name="Autoload (Singletons)"

View File

@@ -8,5 +8,5 @@ config/icon="res://icon.png"
[display]
window/height=450
window/width=550
window/size/height=450
window/size/width=550

View File

@@ -1,7 +1,5 @@
config_version=3
config_version=null
[application]
config/name="Loading in a Thread"

View File

@@ -1,20 +1,18 @@
config_version=3
config_version=null
[application]
config/name="Tween Demo"
run/main_scene="res://main.tscn"
config/icon="res://icon.png"
run/main_scene="res://main.tscn"
target_fps=60
[display]
stretch/aspect="keep_width"
stretch/mode="2d"
window/width=928
window/height=672
window/size/width=928
window/size/height=672
[memory]

View File

@@ -12,9 +12,9 @@ name="Window Management"
[display]
window/fullscreen=false
window/height=600
window/size/height=600
window/resizable=true
window/width=800
window/size/width=800
[input]

View File

@@ -3,14 +3,14 @@ config_version=3
[application]
config/name="Pong Multiplayer"
run/main_scene="res://lobby.tscn"
config/icon="res://icon.png"
run/main_scene="res://lobby.tscn"
[display]
stretch_2d=true
window/height=400
window/width=640
window/size/height=400
window/size/width=640
[input]

View File

@@ -9,8 +9,8 @@ config/icon="res://icon.png"
[display]
stretch_2d=true
window/height=400
window/width=640
window/size/height=400
window/size/width=640
[input]