ropy/rp_map1.py

51 lines
1.6 KiB
Python
Raw Normal View History

2022-08-14 08:03:07 +02:00
import bge # Bibliothèque Blender Game Engine (UPBGE)
import bpy # Blender
from rp_lib import * # Bibliothèque CodeTower
import os
###############################################################################
# rp_map1.py
# @title: Carte 1 pour Ropy
# @project: Ropy (Blender-EduTech)
# @lang: fr
# @authors: Philippe Roy <philippe.roy@ac-grenoble.fr>
# @copyright: Copyright (C) 2020-2022 Philippe Roy
# @license: GNU GPL
#
###############################################################################
scene = bge.logic.getCurrentScene()
###############################################################################
# Map
###############################################################################
# Initialization
def map_init():
# Base
scene.objects['Terrain']['size'] = [-15,15,-10,10] # Map size
# Landscape
# file_path = 'asset/map/map1-landscape.blend'
# inner_path = 'Object'
# object_name = 'Landscape'
# bpy.ops.wm.append(
# filepath=os.path.join(file_path, inner_path, object_name),
# directory=os.path.join(file_path, inner_path),
# filename=object_name)
# Reset counters
def map_reset():
scene.objects['Points']['step']=0
scene.objects['Points']['nbligne']=0
# scene.objects['Points']['lifes']=10
# scene.objects['Points']['lifes_max']=10
# scene.objects['Points']['coins']=0
# scene.objects['Points']['level']=0
# scene.objects['Points']['level_max']=1
# scene.objects['Points']['minions']=0
# scene.objects['Points']['minions_run']=0
# scene.objects['Points']['wave']=1