-
-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added 'bullet' property to go and underlying glue code with box2d - ref #3191 * Issue 3191: getter/setter test for collision-object bullet property - ref #3191 * Issue 3191: proper support for 'bullet' property in the engine that is, besided interfacing with the box2d engine * Issue 3191: Added 'bullet' property to editor - ref #3191 * Issue 3191: Added bullet tests for null physics implementation - ref #3191 Also removed obsolete comment * Issue 3191: Small fix for IsBullet() test - ref #3191
- Loading branch information
Showing
14 changed files
with
207 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
engine/gamesys/src/gamesys/test/collision_object/properties.collisionobject
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
collision_shape: "" | ||
type: COLLISION_OBJECT_TYPE_DYNAMIC | ||
mass: 1.0 | ||
friction: 0.1 | ||
restitution: 0.5 | ||
group: "default" | ||
mask: "default" | ||
embedded_collision_shape { | ||
shapes { | ||
shape_type: TYPE_BOX | ||
position { | ||
x: 0.0 | ||
y: 0.0 | ||
z: 0.0 | ||
} | ||
rotation { | ||
x: 0.0 | ||
y: 0.0 | ||
z: 0.0 | ||
w: 1.0 | ||
} | ||
index: 0 | ||
count: 3 | ||
} | ||
data: 10.0 | ||
data: 10.0 | ||
data: 10.0 | ||
} | ||
linear_damping: 0.0 | ||
angular_damping: 0.0 | ||
locked_rotation: false | ||
bullet: false |
8 changes: 8 additions & 0 deletions
8
engine/gamesys/src/gamesys/test/collision_object/properties.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
components { | ||
id: "properties-script" | ||
component: "/collision_object/properties.script" | ||
} | ||
components { | ||
id: "properties-co" | ||
component: "/collision_object/properties.collisionobject" | ||
} |
20 changes: 20 additions & 0 deletions
20
engine/gamesys/src/gamesys/test/collision_object/properties.script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
-- This is the test script for collision object properties. Starting with 'bullet' property. More to come... | ||
|
||
function test_bullet_property() | ||
-- test getters/setters of bullet property | ||
assert(go.get("go#properties-co", "bullet") == false) | ||
go.set("go#properties-co", "bullet", true) | ||
assert(go.get("go#properties-co", "bullet")) | ||
end | ||
|
||
function init(self) | ||
physics.set_gravity(vmath.vector3(0, -10, 0)) | ||
|
||
test_bullet_property() | ||
end | ||
|
||
tests_done = false -- flag end of test to C level | ||
|
||
function update(self, dt) | ||
tests_done = true | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.