-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEntity.cs
52 lines (38 loc) · 1019 Bytes
/
Entity.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
using System;
using System.Collections.Generic;
using System.Numerics;
using System.Text;
using SFML;
namespace zooiiscool
{
class Entity
{
public Vector2 position = new Vector2();
public Vector2 size = new Vector2();
public Vector2 center = new Vector2();
public bool active = true;
public string texture;
public float rotation;
public virtual void Update()
{
}
public static Entity Instantiate(Entity entity, Vector2 position = new Vector2(), float rotation = 0)
{
entity.position = position;
entity.rotation = rotation;
entity.Start();
Game.Entities.Add(entity);
return entity;
}
public virtual void OnCollision(Entity sender)
{
}
public virtual void Start()
{
}
//don't override this you fucking tard
public void Render()
{
}
}
}