Increase mobile performance

This commit is contained in:
dariasteam 2017-08-08 00:43:17 +01:00
parent 361b6b4386
commit 0578cdc42e
8 changed files with 15 additions and 19 deletions

View file

@ -25,12 +25,12 @@ func reverse_direction():
func _ready():
if (!dir_left):
reverse_direction()
set_fixed_process(true)
set_process(true)
#set_process(true)
func dissapear():
sprite.set_opacity(0)
set_fixed_process(false)
set_process(false)
set_layer_mask_bit(2,false)
hit_single.set_emitting(true)
@ -91,7 +91,7 @@ func change_velocity(amount, right):
v.x += ((dir_left * -1) + (!dir_left * 1)) * amount
func _fixed_process(delta):
func _process(delta):
var motion = v * delta
motion = move(motion)
v.y += delta * GRAVITY

View file

@ -56,7 +56,7 @@ tracks/0/keys = {
"values": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
}
[sub_resource type="ColorRamp" id=10]
[sub_resource type="ColorRamp" id=9]
offsets = FloatArray( 0, 1 )
colors = ColorArray( 0.773438, 0.773438, 0.773438, 1, 0.1875, 0.1875, 0.1875, 1 )
@ -202,7 +202,7 @@ params/anim_initial_pos = 0.0
randomness/direction = 0.29
randomness/spread = 0.8
randomness/linear_velocity = 0.45
color/color_ramp = SubResource( 10 )
color/color_ramp = SubResource( 9 )
[connection signal="body_enter" from="area_head" to="." method="_on_area_head_body_enter"]

View file

@ -5,7 +5,6 @@
[ext_resource path="res://Scenes/Events/ray_milk_end.tres.gd" type="Script" id=3]
[ext_resource path="res://Sprites/Effects/milk_ray.png" type="Texture" id=4]
[sub_resource type="RectangleShape2D" id=1]
custom_solver_bias = 0.0
@ -15,8 +14,8 @@ extents = Vector2( 32, 32 )
enabled = true
cast_to = Vector2( 10000, 0 )
layer_mask = 6
type_mask = 10
layer_mask = 63
type_mask = 11
script/script = ExtResource( 1 )
damage = 50

View file

@ -21,16 +21,16 @@ transform/scale = Vector2( 2, 2 )
mode = 0
tile_set = ExtResource( 1 )
cell/size = Vector2( 64, 64 )
cell/quadrant_size = 32
cell/quadrant_size = 16
cell/custom_transform = Matrix32( 1, 0, 0, 1, 0, 0 )
cell/half_offset = 2
cell/tile_origin = 0
cell/y_sort = false
collision/use_kinematic = false
collision/friction = 1.0
collision/friction = 0.0
collision/bounce = 0.0
collision/layers = 1
collision/mask = 1
collision/layers = 0
collision/mask = 0
occluder/light_mask = 1
tile_data = IntArray( -2031638, 24, -1769503, 28, -1769501, 21, -1769500, 22, -1769495, 19, -1638433, 24, -1638405, 19, -1703909, 24, -1572882, 24, -1638369, 24, -1507361, 24, -1507292, 21, -1507291, 23, -1507290, 22, -1441770, 21, -1441769, 22, -983062, 28, -917536, 23, -917535, 21, -917534, 22, -917516, 23, -786410, 28, -786408, 28, -786406, 26, -786404, 26, -720888, 24, -720879, 24, -524305, 19, -524293, 21, -524292, 22, -524284, 21, -524283, 20, -524282, 20, -524281, 22, -524280, 19, -458737, 21, -458736, 22, -458735, 21, -458734, 20, -458733, 20, -458732, 22, -458726, 19, -458724, 28, -458722, 28, -393179, 21, -393178, 20, -393177, 20, -393176, 22, -196631, 21, -196630, 22 )
@ -43,12 +43,12 @@ z/z = -1
mode = 0
tile_set = ExtResource( 1 )
cell/size = Vector2( 64, 64 )
cell/quadrant_size = 32
cell/quadrant_size = 16
cell/custom_transform = Matrix32( 1, 1, 0, 1, 0, 0 )
cell/half_offset = 2
cell/tile_origin = 0
cell/y_sort = false
collision/use_kinematic = true
collision/use_kinematic = false
collision/friction = 0.0
collision/bounce = 0.0
collision/layers = 2

View file

@ -14,8 +14,6 @@
[ext_resource path="res://Sprites/GUI/HUD/milkbar_outter_1.png" type="Texture" id=12]
[ext_resource path="res://Sprites/GUI/HUD/milkbar_inner.png" type="Texture" id=13]
[sub_resource type="Environment" id=1]
ambient_light/enabled = false
@ -87,10 +85,10 @@ world = SubResource( 2 )
transparent_bg = false
render_target/enabled = false
render_target/v_flip = false
render_target/clear_on_new_frame = true
render_target/clear_on_new_frame = false
render_target/filter = false
render_target/gen_mipmaps = false
render_target/update_mode = 0
render_target/update_mode = 3
audio_listener/enable_2d = true
audio_listener/enable_3d = false
physics/object_picking = false

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Before After
Before After

View file

@ -10,7 +10,6 @@ global="*res://Scenes/Menu/global.gd"
[debug]
force_fps=60
print_fps=true
[display]