forked from EverestAPI/ExampleMod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Entity.cs
41 lines (31 loc) · 1.17 KB
/
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
using Celeste.Mod.Entities;
using Microsoft.Xna.Framework;
using Monocle;
namespace Celeste.Mod.Example {
[CustomEntity("ExampleMod/ExampleEntity")]
public class ExampleEntity : Entity {
public ExampleEntity(EntityData data, Vector2 offset)
: base(data.Position + offset) {
}
// Not all entities are guaranteed to have been added to the scene
public override void Added(Scene scene) {
base.Added(scene);
}
// All entities have been added to the scene (except those added in other Awake methods)
public override void Awake(Scene scene) {
base.Awake(scene);
// A good place to see what other entities are present in the level
if (scene.Tracker.GetEntity<DreamBlock>() != null)
Logger.Log("ExampleModule", "DreamBlock detected in level with ExampleEntity, doing things...");
}
public override void Update() {
base.Update();
}
public override void Render() {
base.Render();
}
public override void Removed(Scene scene) {
base.Removed(scene);
}
}
}