-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Back-up version of finished projects
- Loading branch information
0 parents
commit c0f9dde
Showing
227 changed files
with
704,935 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,37 @@ | ||
""" | ||
Clase controlador, obtiene el input, lo procesa, y manda los mensajes | ||
a los modelos. | ||
""" | ||
|
||
from modelo import Pajarito, Tubos | ||
import glfw | ||
import sys | ||
from typing import Union | ||
|
||
|
||
class Controller(object): | ||
model: Union['Pajarito', None] | ||
tubos: Union['Tubos', None] | ||
|
||
def __init__(self): | ||
self.model = None | ||
self.tubos = None | ||
|
||
def set_model(self, m): | ||
self.model = m | ||
|
||
def on_key(self, window, key, scancode, action, mods): | ||
if not (action == glfw.PRESS or action == glfw.RELEASE): | ||
return | ||
|
||
if key == glfw.KEY_ESCAPE: | ||
glfw.set_window_should_close(window, True) | ||
|
||
# Controlador modifica al modelo | ||
if key == glfw.KEY_UP: | ||
# print('Move up') | ||
self.model.move_up() | ||
|
||
# Raton toca la pantalla.... | ||
else: | ||
print('Unknown key') |
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,28 @@ | ||
""" | ||
Grafica library. | ||
""" | ||
|
||
import platform as __platform | ||
|
||
# patch glfw for MACOS | ||
if __platform.system() == 'Darwin': | ||
import glfw as __glfw | ||
|
||
|
||
def __create_window(width, height, title, monitor, share): | ||
""" | ||
Creates a window and its associated context. | ||
Wrapper for: | ||
GLFWwindow* glfwCreateWindow(int width, int height, const char* title, GLFWmonitor* monitor, GLFWwindow* share); | ||
""" | ||
__glfw.window_hint(__glfw.CONTEXT_VERSION_MAJOR, 3) | ||
__glfw.window_hint(__glfw.CONTEXT_VERSION_MINOR, 3) | ||
__glfw.window_hint(__glfw.OPENGL_FORWARD_COMPAT, True) | ||
__glfw.window_hint(__glfw.OPENGL_PROFILE, __glfw.OPENGL_CORE_PROFILE) | ||
# noinspection PyProtectedMember | ||
return __glfw._glfw.glfwCreateWindow(width, height, __glfw._to_char_p(title), | ||
monitor, share) | ||
|
||
|
||
__glfw.create_window = __create_window |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,22 @@ | ||
# coding=utf-8 | ||
""" | ||
Convenience functionality to access assets files. | ||
""" | ||
|
||
__all__ = ['getAssetPath'] | ||
|
||
import os.path | ||
|
||
__author__ = "Daniel Calderon" | ||
__license__ = "MIT" | ||
|
||
|
||
def getAssetPath(filename): | ||
"""Convenience function to access assets files regardless from where you run the example script.""" | ||
|
||
thisFilePath = os.path.abspath(__file__) | ||
thisFolderPath = os.path.dirname(thisFilePath) | ||
parentFolderPath = os.path.dirname(thisFolderPath) | ||
assetsDirectory = os.path.join(parentFolderPath, "assets") | ||
requestedPath = os.path.join(assetsDirectory, filename) | ||
return requestedPath |
Oops, something went wrong.