-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
74 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from fusionengine.engine.physics import Staticbody | ||
from fusionengine.engine.vector import Vector2D | ||
|
||
|
||
class Node: | ||
def __init__( | ||
self, | ||
x: int, | ||
y: int, | ||
node_type, | ||
body_type=Staticbody, | ||
): | ||
self.x = x | ||
self.y = y | ||
self.x = node_type.x | ||
self.y = node_type.y | ||
self.body_type = body_type | ||
self.node_type = node_type | ||
|
||
pass | ||
|
||
def get_coord_tuple(self) -> tuple[int, int]: | ||
return self.x, self.y | ||
|
||
def get_vec2_coord(self) -> Vector2D: | ||
return Vector2D(self.x, self.y) |
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 @@ | ||
class Rigidbody: | ||
def __init__(self): | ||
pass | ||
|
||
|
||
class Staticbody: | ||
def __init__(self): | ||
pass |
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,27 @@ | ||
import fusionengine as fusion | ||
import time | ||
|
||
checked_time = False | ||
start_time = time.time() | ||
|
||
window = fusion.Window("test", 600, 600) | ||
|
||
|
||
if fusion.__version__ == "5.1.0" or fusion.__version__ == "5.0.0": | ||
image = fusion.Image(fusion.DEBUGIMAGE, 0, 0, 600, 600) | ||
|
||
else: | ||
image = fusion.Image(window, fusion.DEBUGIMAGE, 0, 0, 600, 600) | ||
|
||
|
||
@window.loop | ||
def loop(): | ||
global checked_time | ||
image.draw() | ||
|
||
if not checked_time: | ||
end_time = time.time() | ||
elapsed_time = end_time - start_time | ||
|
||
print(elapsed_time) | ||
checked_time = True |