<?xml version="1.0" encoding="ISO-8859-1" ?>
<Game>
    <GDVersion Major="1" Minor="3" Build="9545" Revision="48052" />
    <Info>
        <Nom value="Pong basique" />
        <Auteur value="" />
        <WindowW value="800" />
        <WindowH value="600" />
        <Portable value="true" />
        <Extensions>
            <Extension name="BuiltinObject" />
            <Extension name="BuiltinAudio" />
            <Extension name="Sprite" />
            <Extension name="BuiltinScene" />
            <Extension name="BuiltinVariables" />
            <Extension name="BuiltinCamera" />
            <Extension name="BuiltinAdvanced" />
            <Extension name="BuiltinFile" />
            <Extension name="CommonDialogs" />
            <Extension name="BuiltinJoystick" />
            <Extension name="BuiltinKeyboard" />
            <Extension name="BuiltinMouse" />
            <Extension name="BuiltinNetwork" />
            <Extension name="BuiltinWindow" />
            <Extension name="BuiltinTime" />
            <Extension name="BuiltinCommonInstructions" />
            <Extension name="BuiltinCommonConversions" />
            <Extension name="BuiltinStringInstructions" />
        </Extensions>
        <FPSmax value="60" />
        <FPSmin value="10" />
        <verticalSync value="false" />
        <Chargement>
            <Afficher value="true" />
            <Border value="true" />
            <Smooth value="true" />
            <Width value="170.000000" />
            <Height value="50.000000" />
            <TexteAfficher value="true" />
            <TexteXPos value="0.000000" />
            <TexteYPos value="5.000000" />
            <Texte value="Chargement" />
            <PourcentAfficher value="false" />
            <PourcentXPos value="0.000000" />
            <PourcentYPos value="0.000000" />
            <ImageAfficher value="false" />
            <Image value="" />
        </Chargement>
    </Info>
    <Images>
        <Image nom="terrain.png" fichier="terrain.png" lissage="true" />
        <Image nom="barre.png" fichier="barre.png" lissage="true" />
        <Image nom="balle.png" fichier="balle.png" lissage="true" />
    </Images>
    <DossierImages />
    <Objects />
    <ObjectGroups />
    <Variables />
    <Scenes>
        <Scene nom="Pong" r="192.000000" v="192.000000" b="192.000000" titre="">
            <GroupesObjets />
            <Objets>
                <Objet nom="terrain" type="Sprite">
                    <Variables />
                    <Animations>
                        <Animation typeNormal="true">
                            <Direction boucle="false" tempsEntre="1.000000">
                                <Sprites>
                                    <Sprite image="terrain.png">
                                        <Points />
                                        <PointOrigine nom="origine" X="0.000000" Y="0.000000" />
                                        <PointCentre nom="centre" X="399.000000" Y="300.000000" automatic="true" />
                                    </Sprite>
                                </Sprites>
                            </Direction>
                        </Animation>
                    </Animations>
                </Objet>
                <Objet nom="barre" type="Sprite">
                    <Variables />
                    <Animations>
                        <Animation typeNormal="true">
                            <Direction boucle="false" tempsEntre="1.000000">
                                <Sprites>
                                    <Sprite image="barre.png">
                                        <Points />
                                        <PointOrigine nom="origine" X="0.000000" Y="0.000000" />
                                        <PointCentre nom="centre" X="27.000000" Y="5.000000" automatic="true" />
                                    </Sprite>
                                </Sprites>
                            </Direction>
                        </Animation>
                    </Animations>
                </Objet>
                <Objet nom="balle" type="Sprite">
                    <Variables />
                    <Animations>
                        <Animation typeNormal="true">
                            <Direction boucle="false" tempsEntre="1.000000">
                                <Sprites>
                                    <Sprite image="balle.png">
                                        <Points />
                                        <PointOrigine nom="origine" X="0.000000" Y="0.000000" />
                                        <PointCentre nom="centre" X="3.000000" Y="3.000000" automatic="true" />
                                    </Sprite>
                                </Sprites>
                            </Direction>
                        </Animation>
                    </Animations>
                </Objet>
            </Objets>
            <Layers>
                <Layer Name="" Visibility="true">
                    <Camera DefaultSize="true" Width="0.000000" Height="0.000000" DefaultViewport="true" ViewportLeft="0.000000" ViewportTop="0.000000" ViewportRight="1.000000" ViewportBottom="1.000000" />
                </Layer>
            </Layers>
            <Variables />
            <Positions>
                <Objet nom="terrain" x="0" y="0" plan="0" layer="" angle="0" personalizedSize="false" width="0" height="0">
                    <floatInfos>
                        <Info name="animation" value="0" />
                    </floatInfos>
                    <stringInfos />
                </Objet>
                <Objet nom="barre" x="15" y="550" plan="1" layer="" angle="0" personalizedSize="false" width="0" height="0">
                    <floatInfos>
                        <Info name="animation" value="0" />
                    </floatInfos>
                    <stringInfos />
                </Objet>
                <Objet nom="balle" x="33" y="539" plan="0" layer="" angle="0" personalizedSize="false" width="0" height="0">
                    <floatInfos>
                        <Info name="animation" value="0" />
                    </floatInfos>
                    <stringInfos />
                </Objet>
            </Positions>
            <Events>
                <Event>
                    <Type value="BuiltinCommonInstructions::Comment" />
                    <Couleur r="128.000000" v="255.000000" b="255.000000" />
                    <Com1 value="Simple pong&#x0A;&#x0A;Utilisez la souris pour diriger la raquette" />
                    <Com2 value="Pong original par Mitsumasa&#x0A;( http://sebastien.beltzung.free.fr/wiki/wakka.php?wiki=JeuxVideo )&#x0A;&#x0A;Adapté par 4ian ( Compil Games )" />
                </Event>
                <Event>
                    <Type value="BuiltinCommonInstructions::Comment" />
                    <Couleur r="255.000000" v="128.000000" b="64.000000" />
                    <Com1 value="Si la position de la raquette n&apos;est&#x0A;pas celle de la souris" />
                    <Com2 value="On la met en dessous la souris" />
                </Event>
                <Event>
                    <Type value="BuiltinCommonInstructions::Standard" />
                    <Conditions>
                        <Condition>
                            <Type value="SourisX" loc="true" Contraire="true" />
                            <Parametre value="barre.X()" />
                            <Parametre value="=" />
                        </Condition>
                    </Conditions>
                    <Actions>
                        <Action>
                            <Type value="MettreX" loc="true" />
                            <Parametre value="barre" />
                            <Parametre value="SourisX()" />
                            <Parametre value="=" />
                        </Action>
                    </Actions>
                </Event>
                <Event>
                    <Type value="BuiltinCommonInstructions::Comment" />
                    <Couleur r="255.000000" v="128.000000" b="64.000000" />
                    <Com1 value="Si la balle est arrêtée&#x0A;( typiquement au départ )" />
                    <Com2 value="On lui donne la fait bouger" />
                </Event>
                <Event>
                    <Type value="BuiltinCommonInstructions::Standard" />
                    <Conditions>
                        <Condition>
                            <Type value="Arret" loc="true" Contraire="false" />
                            <Parametre value="balle" />
                        </Condition>
                    </Conditions>
                    <Actions>
                        <Action>
                            <Type value="AddForceAL" loc="true" />
                            <Parametre value="balle" />
                            <Parametre value="-45+Random(5)-Random(5)&#x0A;" />
                            <Parametre value="250" />
                            <Parametre value="1" />
                        </Action>
                    </Actions>
                </Event>
                <Event>
                    <Type value="BuiltinCommonInstructions::Comment" />
                    <Couleur r="255.000000" v="128.000000" b="64.000000" />
                    <Com1 value="Les évènements suivants&#x0A;modifient la direction de la balle si elle arrive à un bord" />
                    <Com2 value="On retient son angle.&#x0A;On l&apos;arrête.&#x0A;On lui met un nouvel angle.&#x0A;On la replace pour qu&apos;elle&#x0A;ne s&apos;enfonce pas trop.&#x0A;&#x0A;Note : VAL(random[5])-VAL(random[5])&#x0A;permet de choisir un nombre entre -5 et 5.&#x0A;Cela permet de modifier légèrement l&apos;angle&#x0A; pour que la trajectoire ne soit pas toujours&#x0A; la même." />
                </Event>
                <Event>
                    <Type value="BuiltinCommonInstructions::Standard" />
                    <Conditions>
                        <Condition>
                            <Type value="PosY" loc="true" Contraire="false" />
                            <Parametre value="balle" />
                            <Parametre value="0" />
                            <Parametre value="&lt;" />
                        </Condition>
                    </Conditions>
                    <Actions>
                        <Action>
                            <Type value="ModVarObjet" loc="true" />
                            <Parametre value="balle" />
                            <Parametre value="ValeurAngle" />
                            <Parametre value="balle.Angle()" />
                            <Parametre value="=" />
                        </Action>
                        <Action>
                            <Type value="Arreter" loc="true" />
                            <Parametre value="balle" />
                        </Action>
                        <Action>
                            <Type value="AddForceAL" loc="true" />
                            <Parametre value="balle" />
                            <Parametre value="0-balle.Variable(ValeurAngle)+Random(5)-Random(5)" />
                            <Parametre value="250" />
                            <Parametre value="1" />
                        </Action>
                        <Action>
                            <Type value="MettreY" loc="true" />
                            <Parametre value="balle" />
                            <Parametre value="1" />
                            <Parametre value="=" />
                        </Action>
                    </Actions>
                </Event>
                <Event>
                    <Type value="BuiltinCommonInstructions::Standard" />
                    <Conditions>
                        <Condition>
                            <Type value="PosX" loc="true" Contraire="false" />
                            <Parametre value="balle" />
                            <Parametre value="800" />
                            <Parametre value="&gt;" />
                        </Condition>
                    </Conditions>
                    <Actions>
                        <Action>
                            <Type value="ModVarObjet" loc="true" />
                            <Parametre value="balle" />
                            <Parametre value="ValeurAngle" />
                            <Parametre value="balle.Angle()" />
                            <Parametre value="=" />
                        </Action>
                        <Action>
                            <Type value="Arreter" loc="true" />
                            <Parametre value="balle" />
                        </Action>
                        <Action>
                            <Type value="AddForceAL" loc="true" />
                            <Parametre value="balle" />
                            <Parametre value="180-balle.Variable(ValeurAngle)+Random(5)-Random(5)" />
                            <Parametre value="250" />
                            <Parametre value="1" />
                        </Action>
                        <Action>
                            <Type value="MettreX" loc="true" />
                            <Parametre value="balle" />
                            <Parametre value="799" />
                            <Parametre value="=" />
                        </Action>
                    </Actions>
                </Event>
                <Event>
                    <Type value="BuiltinCommonInstructions::Standard" />
                    <Conditions>
                        <Condition>
                            <Type value="PosX" loc="true" Contraire="false" />
                            <Parametre value="balle" />
                            <Parametre value="0" />
                            <Parametre value="&lt;" />
                        </Condition>
                    </Conditions>
                    <Actions>
                        <Action>
                            <Type value="ModVarObjet" loc="true" />
                            <Parametre value="balle" />
                            <Parametre value="ValeurAngle" />
                            <Parametre value="balle.Angle()" />
                            <Parametre value="=" />
                        </Action>
                        <Action>
                            <Type value="Arreter" loc="true" />
                            <Parametre value="balle" />
                        </Action>
                        <Action>
                            <Type value="AddForceAL" loc="true" />
                            <Parametre value="balle" />
                            <Parametre value="180-balle.Variable(ValeurAngle)+Random(5)-Random(5)" />
                            <Parametre value="250" />
                            <Parametre value="1" />
                        </Action>
                        <Action>
                            <Type value="MettreX" loc="true" />
                            <Parametre value="balle" />
                            <Parametre value="1" />
                            <Parametre value="=" />
                        </Action>
                    </Actions>
                </Event>
                <Event>
                    <Type value="BuiltinCommonInstructions::Standard" />
                    <Conditions>
                        <Condition>
                            <Type value="Collision" loc="true" Contraire="false" />
                            <Parametre value="balle" />
                            <Parametre value="barre" />
                        </Condition>
                    </Conditions>
                    <Actions>
                        <Action>
                            <Type value="ModVarObjet" loc="true" />
                            <Parametre value="balle" />
                            <Parametre value="ValeurAngle" />
                            <Parametre value="balle.Angle()" />
                            <Parametre value="=" />
                        </Action>
                        <Action>
                            <Type value="Arreter" loc="true" />
                            <Parametre value="balle" />
                        </Action>
                        <Action>
                            <Type value="AddForceAL" loc="true" />
                            <Parametre value="balle" />
                            <Parametre value="-balle.Variable(ValeurAngle)+Random(5)-Random(5)" />
                            <Parametre value="250" />
                            <Parametre value="1" />
                        </Action>
                        <Action>
                            <Type value="MettreY" loc="true" />
                            <Parametre value="balle" />
                            <Parametre value="barre.Y()-10" />
                            <Parametre value="=" />
                        </Action>
                    </Actions>
                </Event>
                <Event>
                    <Type value="BuiltinCommonInstructions::Comment" />
                    <Couleur r="255.000000" v="128.000000" b="64.000000" />
                    <Com1 value="Si la balle tombe" />
                    <Com2 value="On relance la scène" />
                </Event>
                <Event>
                    <Type value="BuiltinCommonInstructions::Standard" />
                    <Conditions>
                        <Condition>
                            <Type value="PosY" loc="true" Contraire="false" />
                            <Parametre value="balle" />
                            <Parametre value="600" />
                            <Parametre value="&gt;" />
                        </Condition>
                    </Conditions>
                    <Actions>
                        <Action>
                            <Type value="Scene" loc="true" />
                            <Parametre value='&quot;Pong&quot;' />
                        </Action>
                    </Actions>
                </Event>
            </Events>
        </Scene>
    </Scenes>
</Game>
