Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Raylib_cs;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Numerics;
- using System.Text;
- using System.Threading.Tasks;
- namespace Snake
- {
- internal class Waz
- {
- private List<Vector2> cialo;
- private Vector2 kierunek;
- private int rozmiarSiatki;
- private int szerokoscEkranu;
- private int wysokoscEkranu;
- private bool rosnij;
- public Waz(int rozmiarSiatki, int szerokoscEkranu, int wysokoscEkranu)
- {
- this.rozmiarSiatki = rozmiarSiatki;
- this.szerokoscEkranu = szerokoscEkranu;
- this.wysokoscEkranu = wysokoscEkranu;
- cialo = new List<Vector2>();
- cialo.Add(new Vector2(szerokoscEkranu / 2, wysokoscEkranu / 2));
- kierunek = new Vector2(1, 0);
- rosnij = false;
- }
- public void Rysuj()
- {
- foreach (var segment in cialo)
- {
- Raylib.DrawRectangle((int)segment.X, (int)segment.Y,
- rozmiarSiatki, rozmiarSiatki, Color.Green);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement