Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Corentin MIMEAU
PolyDefense
Commits
8c486e0c
Commit
8c486e0c
authored
Dec 13, 2015
by
Vincent BRULE
Browse files
pas utile
parent
c6d51f8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
projectile.py
deleted
100644 → 0
View file @
c6d51f8e
# -*- coding: utf-8 -*-
# http://pad.univ-nantes.fr/editor/p/g.KMzBqiBBATY1dYss$Ageofdefense
import
math
from
pygame
import
*
import
time
import
os
from
carteStruct
import
*
from
constante
import
Constante
from
base
import
*
from
joueur
import
*
from
tour
import
*
class
Projectile
:
def
__init__
(
self
,
dep
,
arr
,
v
,
u
):
self
.
depart
=
dep
self
.
arrive
=
arr
self
.
vitesse
=
v
self
.
unite
=
u
self
.
position
=
dep
def
avancer
(
self
,
ecran
):
x
=
self
.
position
[
0
]
-
self
.
unite
.
position
[
0
]
y
=
self
.
position
[
1
]
-
self
.
unite
.
position
[
1
]
#pente = y/x
dx
=
(
-
1
if
x
>
0
else
1
)
dy
=
(
-
1
if
x
>
0
else
1
)
u
=
self
.
position
[
0
]
+
dx
v
=
self
.
position
[
1
]
+
dy
self
.
position
=
(
u
,
v
)
print
self
.
position
draw
.
rect
(
ecran
,
(
255
,
0
,
0
),
(
u
,
v
,
10
,
10
))
def
detruire
(
self
):
print
"detruire"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment