Compare commits

..

No commits in common. "3c9c2a6e9f7f4ab2ab215eb2b2980c47fcbd6ac5" and "0b5e2681184a215a830217fb15fc4be882e06e8c" have entirely different histories.

2 changed files with 10 additions and 10 deletions

View File

@ -25,8 +25,8 @@ const Hero = () => {
// zmienne globalne bedace danymi wejsciowymi do modelu // zmienne globalne bedace danymi wejsciowymi do modelu
var shooterX = 12; var shooterX = 0;
var shooterY = 12; var shooterY = 0;
//zamiana procentowych pozycji na kartezyjskie //zamiana procentowych pozycji na kartezyjskie
function konwerturX(x){ function konwerturX(x){
@ -38,6 +38,8 @@ const Hero = () => {
return Math.round(fY*68)/100 return Math.round(fY*68)/100
} }
function changePlayer(a){ function changePlayer(a){
document.getElementById("bbt1").style.background = "#99FFCC"; document.getElementById("bbt1").style.background = "#99FFCC";
@ -75,7 +77,6 @@ const Hero = () => {
number_of_defenders = 0 number_of_defenders = 0
number_of_strikers = 0 number_of_strikers = 0
number_of_goalkeepers = 0 number_of_goalkeepers = 0
numer_od_shooters = 0
} }
@ -89,16 +90,13 @@ const Hero = () => {
list.removeChild(player) list.removeChild(player)
bojo.removeChild(ball) bojo.removeChild(ball)
if(possition == 1){ if(possition == 1){
number_of_goalkeepers = 0 number_of_goalkeepers = number_of_goalkeepers -1
}else if(possition == 2){ }else if(possition == 2){
number_of_defenders = number_of_defenders -1 ; number_of_defenders = number_of_defenders -1 ;
}else if (possition == 3){ }else if (possition == 3){
number_of_strikers = number_of_strikers -1 ; number_of_strikers = number_of_strikers -1 ;
}else if(possition == 0){
numer_od_shooters = 0
} }
} }
function addPlayer(possition, ball){ function addPlayer(possition, ball){
//Zmiana stylu w zaleznosci czy zawodnik jest obronca/napastnikiem iyp. //Zmiana stylu w zaleznosci czy zawodnik jest obronca/napastnikiem iyp.
var pName = "Strzelec" var pName = "Strzelec"
@ -164,7 +162,9 @@ const Hero = () => {
// listenery pozwalające na przesuwanie punktu // listenery pozwalające na przesuwanie punktu
ball.addEventListener("mousedown", function przesuwanie(){ ball.addEventListener("mousedown", function przesuwanie(){
ball.style.background = "orange" ball.style.background = "orange"
@ -183,8 +183,8 @@ const Hero = () => {
tekst.style.color = "white" tekst.style.color = "white"
posytion.style.color = "white" posytion.style.color = "white"
x = parseFloat(x) -2 x = parseFloat(x) + 1
y = parseFloat(y) -2 y = parseFloat(y) + 1
if(bojo.parentNode.querySelector(":hover")){ if(bojo.parentNode.querySelector(":hover")){
ball.style.left = x + "%" ball.style.left = x + "%"