Adding a camera that follow the player

This commit is contained in:
AnonymusRaccoon
2020-01-07 15:45:48 +01:00
parent b2b6b94b3e
commit 3a611e2f76
6 changed files with 9 additions and 4 deletions
+4
View File
@@ -16,6 +16,7 @@
<Rect height="auto" width="auto" top="0" left="0" />
</renderer>
<parallax_component speed="60" />
<fixed_to_cam />
</gc_entity>
<gc_entity>
<transform_component>
@@ -26,6 +27,7 @@
<Rect height="auto" width="auto" top="0" left="0" />
</renderer>
<parallax_component speed="90" />
<fixed_to_cam />
</gc_entity>
<gc_entity>
<transform_component>
@@ -36,6 +38,7 @@
<Rect height="auto" width="auto" top="0" left="0" />
</renderer>
<parallax_component speed="100" />
<fixed_to_cam />
</gc_entity>
<gc_entity>
<transform_component>
@@ -46,6 +49,7 @@
<Rect height="auto" width="auto" top="0" left="0" />
</renderer>
<parallax_component speed="120" />
<fixed_to_cam />
</gc_entity>
<gc_entity>
+1
View File
@@ -15,5 +15,6 @@
<jump_action acceleration="17000" counterforce="6000" step_count="7"/>
<collision_component layer="11000000" />
<friction_component value=".5" />
<camerafollow_component />
</gc_entity>
</gc_entities>
+1 -1
View File
@@ -34,7 +34,7 @@ void gravity_destroy(void *system)
}
const gc_system gravity_system = {
name: "GravitySystem",
name: "gravity_system",
component_name: "gravity_component",
size: sizeof(gc_system),
ctr: NULL,
+1 -1
View File
@@ -49,7 +49,7 @@ static void destroy(void *system)
}
const gc_system jump_system = {
name: "JumpSystem",
name: "jump_system",
component_name: "jump_action",
size: sizeof(gc_system),
ctr: NULL,
+1 -1
View File
@@ -38,7 +38,7 @@ void walk_destroy(void *system)
}
const gc_system walk_system = {
name: "WalkSystem",
name: "walk_system",
component_name: "walk_action",
size: sizeof(gc_system),
ctr: NULL,