diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-09-17 09:50:03 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-09-17 09:50:03 -0300 |
commit | 37af389717ae04e1a1cd0713dfa26e884931692a (patch) | |
tree | d0421ae84f9f7698cab10dae3182c728b81a034f | |
parent | f00f4b9296a827ac1014cc2cc84b0dfbb4cac497 (diff) | |
parent | 5b6773f6bcd79d5efaa43ef1ce58817e4b3556b5 (diff) |
Merge pull request #680 from Qwertie-/Quick-fix
Fixed typo and standardised spacing
-rw-r--r-- | demos/2d/kinematic_char/colworld.gd | 8 | ||||
-rw-r--r-- | demos/2d/kinematic_char/player.gd | 23 | ||||
-rw-r--r-- | demos/2d/pong/pong.gd | 12 |
3 files changed, 21 insertions, 22 deletions
diff --git a/demos/2d/kinematic_char/colworld.gd b/demos/2d/kinematic_char/colworld.gd index efd1dab805..d13ff9236b 100644 --- a/demos/2d/kinematic_char/colworld.gd +++ b/demos/2d/kinematic_char/colworld.gd @@ -1,12 +1,12 @@ extends Node2D -# member variables here, example: -# var a=2 -# var b="textvar" +#member variables here, example: +#var a=2 +#var b="textvar" func _ready(): - # Initalization here + #Initalization here pass diff --git a/demos/2d/kinematic_char/player.gd b/demos/2d/kinematic_char/player.gd index b35bbfa693..5c56477758 100644 --- a/demos/2d/kinematic_char/player.gd +++ b/demos/2d/kinematic_char/player.gd @@ -1,18 +1,18 @@ extends KinematicBody2D -# This is a simple collision demo showing how -# the kinematic cotroller works. -# move() will allow to move the node, and will -# always move it to a non-colliding spot, -# as long as it starts from a non-colliding spot too. +#This is a simple collision demo showing how +#the kinematic cotroller works. +#move() will allow to move the node, and will +#always move it to a non-colliding spot, +#as long as it starts from a non-colliding spot too. #pixels / second const GRAVITY = 500.0 -# Angle in degrees towards either side that the player can -# consider "floor". +#Angle in degrees towards either side that the player can +#consider "floor". const FLOOR_ANGLE_TOLERANCE = 40 const WALK_FORCE = 600 const WALK_MAX_SPEED = 200 @@ -68,7 +68,6 @@ func _fixed_process(delta): var motion = velocity * delta #move and consume motion -# motion = move(motion) @@ -85,9 +84,9 @@ func _fixed_process(delta): floor_velocity=get_collider_velocity() #velocity.y=0 - # But we were moving and our motion was interrupted, - # so try to complete the motion by "sliding" - # by the normal + #But we were moving and our motion was interrupted, + #so try to complete the motion by "sliding" + #by the normal motion = n.slide(motion) velocity = n.slide(velocity) @@ -109,7 +108,7 @@ func _fixed_process(delta): prev_jump_pressed=jump func _ready(): - # Initalization here + #Initalization here set_fixed_process(true) pass diff --git a/demos/2d/pong/pong.gd b/demos/2d/pong/pong.gd index bfffdcf0d8..cf6003c659 100644 --- a/demos/2d/pong/pong.gd +++ b/demos/2d/pong/pong.gd @@ -1,9 +1,9 @@ extends Node2D -# member variables here, example: -# var a=2 -# var b="textvar" +#member variables here, example: +#var a=2 +#var b="textvar" const INITIAL_BALL_SPEED = 80 var ball_speed = INITIAL_BALL_SPEED var screen_size = Vector2(640,400) @@ -16,7 +16,7 @@ const PAD_SPEED = 150 func _process(delta): - # get ball positio and pad rectangles + #get ball position and pad rectangles var ball_pos = get_node("ball").get_pos() var left_rect = Rect2( get_node("left").get_pos() - pad_size*0.5, pad_size ) var right_rect = Rect2( get_node("right").get_pos() - pad_size*0.5, pad_size ) @@ -44,7 +44,7 @@ func _process(delta): get_node("ball").set_pos(ball_pos) - #move left pad + #move left pad var left_pos = get_node("left").get_pos() if (left_pos.y > 0 and Input.is_action_pressed("left_move_up")): @@ -67,7 +67,7 @@ func _process(delta): func _ready(): - screen_size = get_viewport_rect().size # get actual size + screen_size = get_viewport_rect().size #get actual size pad_size = get_node("left").get_texture().get_size() set_process(true) |