Giter Site home page Giter Site logo

Comments (1)

togfoxy avatar togfoxy commented on September 16, 2024
function functions.loadImages()
	IMAGE[enum.imageCell] = love.graphics.newImage("assets/images/cell_32x16.png")
	IMAGE[enum.imageCellShaded] = love.graphics.newImage("assets/images/cellshaded_32x16.png")
	IMAGE[enum.imageCellFinish] = love.graphics.newImage("assets/images/cellfinish_32x16.png")
	IMAGE[enum.imageCar] = love.graphics.newImage("assets/images/car_64x29.png")
	IMAGE[enum.imageTrack] = love.graphics.newImage("assets/images/track.jpg")
	
	CARIMAGE[1] = love.graphics.newImage("assets/images/car1.png")
	CARIMAGE[2] = love.graphics.newImage("assets/images/car2.png")
	CARIMAGE[3] = love.graphics.newImage("assets/images/car3.png")
	CARIMAGE[4] = love.graphics.newImage("assets/images/car4.png")
	CARIMAGE[5] = love.graphics.newImage("assets/images/car5.png")
	CARIMAGE[6] = love.graphics.newImage("assets/images/car6.png")
end



-- draw the cars
for i = 1, numofcars do
    local drawx = racetrack[cars[i].cell].x
    local drawy = racetrack[cars[i].cell].y

    if cars[i].isEliminated then
        love.graphics.setColor(1,0,0,1)     -- red for crash
    else
        love.graphics.setColor(1,1,1,1)     -- white
    end
	
    love.graphics.draw(CARIMAGE[currentplayer], drawx, drawy, racetrack[cars[i].cell].rotation , 1, 1, 32, 15)
end	

from formulaspeed.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.