Пример #1
0
def build_characterization():
    return [
        html.Div([
            dbc.Row([
                dbc.Col([
                    sidebar.characterization(),
                    map.map(),
                ]),
            ]),
            dbc.Row([
                html.Div([dcc.Graph(id="characterization-barsentence")],
                         className='col-lg-6 mt-5'),
                html.Div([dcc.Graph(id="characterization-barage")],
                         className='col-lg-6 mt-5'),
                html.Div(
                    [dcc.Graph(id="characterization-line")],
                    className='col-xl-12 col-lg-12 mt-5 charts_container'),
                html.Div(
                    [dcc.Graph(id="characterization-block")],
                    className='col-xl-12 col-lg-12 mt-5 charts_container'),
            ])
        ])
    ]
Пример #2
0
import time

# Python doesn't seem to allow clean imports
# from sibling folders.
sys.path.append('..')
from lib.char import char
from lib.map import map


pygame.init()
window = pygame.display.set_mode((640, 480))
pygame.display.set_caption('Hittest testing')
screen = pygame.display.get_surface()

hero = char(False)
map = map(False)

body = pygame.Surface((32, 32))
body.fill((255, 0, 0))

hero.frames[''] = {'n': {'s': ['rect'], 'm': ['rect']}, 'w': {'s': ['rect'], 'm': ['rect']}, 'e': {'s': ['rect'], 'm': ['rect']}, 's': {'s': ['rect'], 'm': ['rect']}}
hero.state = 'm'

#print(hero.frames)
hero.images['rect'] = body

rect = pygame.Surface((32, 32))
rect.fill((255, 255, 255))

map.images['rect'] = rect
Пример #3
0
from lib.map import map
from lib.item import item


pygame.init()
window = pygame.display.set_mode((640, 480))
pygame.display.set_caption('Nerds\' main screen')
screen = pygame.display.get_surface()

debug = False  # switch to True for quick debug visuals

hero = char()
if debug:
	hero.debug = True

objects = {'npcs': [], 'map': map(), 'hero': hero}

if debug:
	objects['map'].debug = True

hero.map = objects['map'].file

gameW = 640
gameH = 480
font = pygame.font.Font(None, 20)
dx = 0
dy = 0
keys = []
dialogues = []
dialogue_action = ''
frames_this_second = 0
Пример #4
0
import time

# Python doesn't seem to allow clean imports
# from sibling folders.
sys.path.append('..')
from lib.map import map


pygame.init()
window = pygame.display.set_mode((640, 480))
pygame.display.set_caption('Map view')
screen = pygame.display.get_surface()

map_name = 'main'

map = map(map_name, os.path.join('..', '..', ''))

x = 0
y = 0
speed = 5
multiplier = 1
up = False
down = False
left = False
right = False
no_key_yet = True
font = pygame.font.Font(None, 20)

while True:

	if no_key_yet: