Skip to content
Snippets Groups Projects
Select Git revision
  • f17eadfb4b26aac5c53120d3da52ca3ca16542ac
  • master default protected
  • gitkeep
  • dev protected
  • Issue/2449-GuidPidSlugToProjectSettings
  • Issue/2309-docs
  • Issue/2355-topLevelOrg
  • Issue/2328-noFailOnLog
  • Hotfix/2371-fixGitLabinRCV
  • Issue/2287-guestRole
  • Fix/xxxx-activateGitlab
  • Test/xxxx-enablingGitLab
  • Issue/2349-gitlabHttps
  • Issue/2259-updatePids
  • Issue/2101-gitLabResTypeUi
  • Hotfix/2202-fixNaNQuota
  • Issue/2246-quotaResoval
  • Issue/2221-projectDateCreated
  • Hotfix/2224-quotaSizeAnalytics
  • Fix/xxxx-resourceVisibility
  • Issue/2000-gitlabResourcesAPI
  • v4.4.3
  • v4.4.2
  • v4.4.1
  • v4.4.0
  • v4.3.4
  • v4.3.3
  • v4.3.2
  • v4.3.1
  • v4.3.0
  • v4.2.8
  • v4.2.7
  • v4.2.6
  • v4.2.5
  • v4.2.4
  • v4.2.3
  • v4.2.2
  • v4.2.1
  • v4.2.0
  • v4.1.1
  • v4.1.0
41 results

LicenseController.cs

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    graphics.js 2.04 KiB
    var playerPic = document.createElement("img");
    var tilePics=[   ];
    var picsToLoad = 2;
    //
    var SQUARE_SIZE = 1000/11;
    
    function countLoadedImageAndLaunchIfReady(){
        picsToLoad-=1;
        if (picsToLoad == 0){
            loadingDone();
        }
    }
    
    function loadImages(){
        
         var imageList = [
            /* {trackType: TILE_GROUND, path:"world_ground.png"},
            {trackType: TILE_WALL, path:"world_wall.png"}, */
            {pic: playerPic, path:"bomberman.png"},
        ];
        
        picsToLoad= imageList.length
        
        for(i=0; i<imageList.length; i++){
            if(imageList[i].trackType != undefined){
                loadImageForTileCode(imageList[i].trackType, imageList[i].path);
            } else {
                beginLoadingImage(imageList[i].pic, imageList[i].path);
            }
        }
    }
    
    function beginLoadingImage(pic, path){
        pic.onload=countLoadedImageAndLaunchIfReady;
        pic.src="images/"+path;
    }
    
    function loadImageForTileCode(trackCode, fileName){
        tilePics[trackCode] = document.createElement("img");
        beginLoadingImage(tilePics[trackCode], fileName);
    }
    
    function drawWall (wallX, wallY) {
        canvasContext.drawImage(WallPic, wallX, wallY);
    }
    
    function drawCenteredRotatingBitMap(pic, picX, picY, angle){
        canvasContext.save();
        canvasContext.translate(picX, picY);
        canvasContext.rotate(angle);
        canvasContext.drawImage(pic, -pic.width/2, -pic.height/2);
        canvasContext.restore();
    }
    
    //provisorische graphiken
    function drawBall(ballX,ballY,ballRadius,ballColour){
        canvasContext.fillStyle = ballColour;
        canvasContext.beginPath();
        canvasContext.arc(ballX, ballY, ballRadius, 0, 2*Math.PI, true);
        canvasContext.fill();
    }
    
    function drawRectangle(X, Y, width, height, colour){
        canvasContext.fillStyle = colour;
        canvasContext.fillRect(X, Y, width, height);
    }
    
    function drawBombs(X, Y){
        var icon = new Image;
        icon.src = 'images/bombs_up.png';
        canvasContext.drawImage(icon, X, Y, 80, 80);
    }
    
    function drawRange(X, Y){
        var icon = new Image;
        icon.src = 'images/range_up.png';
        canvasContext.drawImage(icon, X, Y, 80, 80);
    }