-
-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 3191 expose isbullet #5905
Merged
Merged
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
934ea7a
Added 'bullet' property to go and underlying glue code with box2d - r…
otsakir 7b98ccf
Issue 3191: getter/setter test for collision-object bullet property -…
otsakir dff1fa1
Issue 3191: proper support for 'bullet' property in the engine
otsakir 5c87e7b
Issue 3191: Added 'bullet' property to editor - ref #3191
otsakir 15e7bc4
Merge branch 'dev' into issue-3191-expose-isbullet
otsakir 65008a6
Issue 3191: Added bullet tests for null physics implementation - ref …
otsakir 4f1eacb
Issue 3191: Small fix for IsBullet() test - ref #3191
otsakir File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've done the TODO, so you can remove the comment :)