Compare commits
No commits in common. "3c9c2a6e9f7f4ab2ab215eb2b2980c47fcbd6ac5" and "0b5e2681184a215a830217fb15fc4be882e06e8c" have entirely different histories.
3c9c2a6e9f
...
0b5e268118
@ -25,8 +25,8 @@ const Hero = () => {
|
||||
|
||||
// zmienne globalne bedace danymi wejsciowymi do modelu
|
||||
|
||||
var shooterX = 12;
|
||||
var shooterY = 12;
|
||||
var shooterX = 0;
|
||||
var shooterY = 0;
|
||||
|
||||
//zamiana procentowych pozycji na kartezyjskie
|
||||
function konwerturX(x){
|
||||
@ -38,6 +38,8 @@ const Hero = () => {
|
||||
return Math.round(fY*68)/100
|
||||
}
|
||||
|
||||
|
||||
|
||||
function changePlayer(a){
|
||||
|
||||
document.getElementById("bbt1").style.background = "#99FFCC";
|
||||
@ -75,7 +77,6 @@ const Hero = () => {
|
||||
number_of_defenders = 0
|
||||
number_of_strikers = 0
|
||||
number_of_goalkeepers = 0
|
||||
numer_od_shooters = 0
|
||||
}
|
||||
|
||||
|
||||
@ -89,16 +90,13 @@ const Hero = () => {
|
||||
list.removeChild(player)
|
||||
bojo.removeChild(ball)
|
||||
if(possition == 1){
|
||||
number_of_goalkeepers = 0
|
||||
number_of_goalkeepers = number_of_goalkeepers -1
|
||||
}else if(possition == 2){
|
||||
number_of_defenders = number_of_defenders -1 ;
|
||||
}else if (possition == 3){
|
||||
number_of_strikers = number_of_strikers -1 ;
|
||||
}else if(possition == 0){
|
||||
numer_od_shooters = 0
|
||||
}
|
||||
}
|
||||
|
||||
function addPlayer(possition, ball){
|
||||
//Zmiana stylu w zaleznosci czy zawodnik jest obronca/napastnikiem iyp.
|
||||
var pName = "Strzelec"
|
||||
@ -165,6 +163,8 @@ const Hero = () => {
|
||||
// listenery pozwalające na przesuwanie punktu
|
||||
|
||||
|
||||
|
||||
|
||||
ball.addEventListener("mousedown", function przesuwanie(){
|
||||
|
||||
ball.style.background = "orange"
|
||||
@ -183,8 +183,8 @@ const Hero = () => {
|
||||
tekst.style.color = "white"
|
||||
posytion.style.color = "white"
|
||||
|
||||
x = parseFloat(x) -2
|
||||
y = parseFloat(y) -2
|
||||
x = parseFloat(x) + 1
|
||||
y = parseFloat(y) + 1
|
||||
|
||||
if(bojo.parentNode.querySelector(":hover")){
|
||||
ball.style.left = x + "%"
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user