View difference between Paste ID: 9ht1wLZ1 and N335WsEg
SHOW: | | - or go back to the newest paste.
1
#include <iostream>
2-
#include <vector>
2+
#include <raylib.h>
3-
#include <string>
3+
4-
#include <cstdlib>
4+
5
6
int main () 
7
{
8-
class Entity
8+
    const int windowHeight = 720;
9
    const int windowWidth = 1280; 
10-
        private:
10+
    InitWindow(windowWidth, windowHeight, "Moja pierwsza gra Raylib");
11
12-
            string name;
12+
    SetTargetFPS(60);
13-
            int health;
13+
14-
            int maxHealth;
14+
    while(WindowShouldClose() == false) 
15-
            int damage;
15+
16-
        
16+
        BeginDrawing();
17-
        public:
17+
        ClearBackground(RAYWHITE);
18
19-
            Entity(string entityName) 
19+
        DrawLine(windowWidth / 2, 0, windowWidth / 2, windowHeight, BLACK);
20-
            {
20+
        DrawCircle(windowWidth / 2, windowHeight / 2, 20, BLACK);
21-
                name = entityName;
21+
        DrawRectangle(10, windowHeight / 2 - 60, 25, 120, BLACK);
22-
                maxHealth = 10;
22+
        DrawRectangle(windowWidth - 35, windowHeight / 2 - 60, 25, 120, BLACK);
23-
                health = maxHealth;
23+
        EndDrawing();
24-
                damage = 2;
24+
    }
25-
            }
25+
26
    CloseWindow();
27-
            string get_name() 
27+
28-
            {
28+
    return 0;
29-
                return name;
29+
}