« Soya/Python base 5 » : différence entre les versions
Contenu supprimé Contenu ajouté
Création : # -*- indent-tabs-mode: t -*- # Soya 3D tutorial # Copyright (C) 2004 Jean-Baptiste LAMY # # This program is free software; you can redistribute it and/or modify # it under the terms of... |
Aucun résumé des modifications |
||
Ligne 1 :
<pre>
# -*- indent-tabs-mode: t -*-
Ligne 22 ⟶ 23 :
# Dans cette leçon notre chenille va nous obéir !
# Vous allez apprendre comment utiliser les évenements de SDL avec Soya.
# Utilisez les touches directionelles pour contrôler la chenille.
# Importation des modules de Soya.
#
import sys, os, os.path, soya, soya.sdlconst
Ligne 34 ⟶ 35 :
soya.path.append(os.path.join(os.path.dirname(sys.argv[0]), "data"))
#
scene = soya.World()
#
class CaterpillarHead(soya.Body):
Ligne 51 :
soya.Body.begin_round(self)
#
#
#
# - (KEYDOWN, keysym, modifier) where keysym is the key's code (a K_* constant)
# and modifier is a flag combining some of the MOD_* constant (to test the presence
|