-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
ComponentGeneratorTests.Component#MyAppMainSomeEntityExtension.g.verified.cs
42 lines (37 loc) · 1.54 KB
/
ComponentGeneratorTests.Component#MyAppMainSomeEntityExtension.g.verified.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
//HintName: MyAppMainSomeEntityExtension.g.cs
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by
// Entitas.Generators.ComponentGenerator.EntityExtension
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
public static class MyAppMainSomeEntityExtension
{
static readonly SomeComponent SingleSomeComponent = new SomeComponent();
public static bool HasSome(this global::MyApp.Main.Entity entity)
{
return entity.HasComponent(MyAppMainSomeComponentIndex.Index.Value);
}
public static global::MyApp.Main.Entity AddSome(this global::MyApp.Main.Entity entity)
{
entity.AddComponent(MyAppMainSomeComponentIndex.Index.Value, SingleSomeComponent);
return entity;
}
public static global::MyApp.Main.Entity ReplaceSome(this global::MyApp.Main.Entity entity)
{
entity.ReplaceComponent(MyAppMainSomeComponentIndex.Index.Value, SingleSomeComponent);
return entity;
}
public static global::MyApp.Main.Entity RemoveSome(this global::MyApp.Main.Entity entity)
{
entity.RemoveComponent(MyAppMainSomeComponentIndex.Index.Value);
return entity;
}
public static SomeComponent GetSome(this global::MyApp.Main.Entity entity)
{
return (SomeComponent)entity.GetComponent(MyAppMainSomeComponentIndex.Index.Value);
}
}