• Start
      • Back
      • Blog
      • Joomla 3 - administracja
      • Joomla 4 - administracja
      • Wordpress - administracja
      • Code Combat
      • Joomla czy Wordpress
      • Polityka prywatności
  • Portfolio
  • Strony internetowe
      • Back
      • Aktualizacje i szkolenia
      • Strony Responsywne
      • Jak pracuję
      • CMS Joomla
      • Pozycjonowanie strony
      • Hosting

Codecombat - forest miners - Leśni górnicy - JavaScript

Szczegóły
21 styczeń 2020
2576

// Sprawdź czy miny są bezpieczne dla robotników.

function checkEnemyOrSafe(target) {
    // jeśli cel (parametr) istnieje :
    if (target) {
        
    
        // Następnie zaatakuj cel.
        hero.attack(target);
    }
    // Otherwise:
    else {
        
    

Więcej…

Codecombat - backwoods fork - Matecznik Rozwidlenie - JavaScript

Szczegóły
20 styczeń 2020
2721

// Użyj funkcji checkAndAttack by uprościć swój kod.

// Ta funkcja ma parametr.
// Parametr to sposób na przekazanie informacji do funkcji.
function checkAndAttack(target) {
    // Parametr 'target' jest tylko zmienną!
    // Zawiera argument ,gdy funkcja zostanie wywołana.
    if(target) {
        hero.attack(target);
    }
    hero.moveXY(43, 34);
}

Więcej…

Codecombat - village champion - JavaScript

Szczegóły
20 styczeń 2020
2563

// Incoming munchkins! Defend the town!

// Define your own function to fight the enemy!
function cleaveOrAttack() {
    // In the function, find an enemy, then cleave or attack it.
    var ogre = hero.findNearestEnemy();
    if (ogre) {
        if (hero.isReady("cleave")) {
            hero.cleave(ogre);
        }
        // Else attack the ogre:
        else {
            hero.attack(ogre);
        }
    }
}

Więcej…

Codecombat - a fine mint - Zacna mennica - JavaScript

Szczegóły
20 styczeń 2020
2871

// Wyrobnicy próbują ukraść twoje monety!
// Napisz funkcję, by zgnieść ich nim pozbawią cię monet.

function pickUpCoin() {
    var coin = hero.findNearestItem();
    if(coin) {
        hero.moveXY(coin.pos.x, coin.pos.y);
    }
}

Więcej…

Codecombat - backwoods fork - Matecznik Rozwidlenie - Python

Szczegóły
20 styczeń 2020
1745

# Użyj funkcji checkAndAttack by uprościć swój kod.

# Ta funkcja ma parametr.
# Parametr to sposób na przekazanie informacji do funkcji.
def checkAndAttack(target):
    # Parametr 'target' jest tylko zmienną!
    # Zawiera argument ,gdy funkcja zostanie wywołana.
    if target:
        hero.attack(target)
    hero.moveXY(43, 34)

Więcej…

Codecombat - stillness in motion - JavaScript

Szczegóły
05 styczeń 2020
2964

// You can put one if-statement within another if-statement.
// Be careful how the if statements interact with each other.
// It's helpful to start with one outer if/else,
// using comments as placeholders for the inner if/else:

while(true) {
    var enemy = hero.findNearestEnemy();
    // If there is an enemy, then...
    if(enemy) {
        // Create a distance variable with distanceTo.
        var distance = this.distanceTo(enemy);
        // If the distance is less than 5 meters, then attack.
        if(distance < 5){
                  this.attack(enemy);
        }

Więcej…

Codecombat - the agrippa defense - JavaScript

Szczegóły
05 styczeń 2020
3095

while(true) {
    var enemy = hero.findNearestEnemy();
    if(enemy) {
        // Find the distance to the enemy with distanceTo.
        var distance = hero.distanceTo(enemy);
        // If the distance is less than 5 meters...
        if(distance < 5){
                  

Więcej…

Codecombat - agrippa defense - village warder - JavaScript

Szczegóły
05 styczeń 2020
2865

// This function attacks the nearest enemy.
function findAndAttackEnemy() {
    var enemy = hero.findNearestEnemy();
    if (enemy) {
        hero.attack(enemy);
    }
}

// Define a function to cleave enemies (but only when the ability is ready).
function findAndCleaveEnemy() {
    // Find the nearest enemy:
    var enemy = hero.findNearestEnemy();
    // If an enemy exists:
    if (enemy) {
        
    
        // And if "cleave" is ready:
        if (hero.isReady("cleave")) {
        
            // It's time to cleave!
       
        hero.cleave(enemy);
    }
    }
}

Więcej…

Strona 25 z 27

  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • Strony internetowe Lublin
  • Strony internetowe Puławy
  • Strony www Puławy
  • Strony www Lublin
  • Strony responsywne Lublin
wykonanie: kasai1.com