Elin Modding Docs Doc
Loading...
Searching...
No Matches
TileSelectorElona.cs
1using System;
2using CreativeSpore.SuperTilemapEditor;
3using UnityEngine;
4
5// Token: 0x020001B1 RID: 433
7{
8 // Token: 0x170002FE RID: 766
9 // (get) Token: 0x06000C61 RID: 3169 RVA: 0x0005C8EA File Offset: 0x0005AAEA
10 public EloMap elomap
11 {
12 get
13 {
14 return this.actor.elomap;
15 }
16 }
17
18 // Token: 0x170002FF RID: 767
19 // (get) Token: 0x06000C62 RID: 3170 RVA: 0x0005C8F7 File Offset: 0x0005AAF7
20 public STETilemap fogmap
21 {
22 get
23 {
24 return this.elomap.fogmap;
25 }
26 }
27
28 // Token: 0x06000C63 RID: 3171 RVA: 0x0005C904 File Offset: 0x0005AB04
29 public unsafe override void OnRenderTile(Point point, HitResult result, bool shouldHide)
30 {
31 this.srHighlight.SetActive(!shouldHide);
32 if (result == HitResult.NoTarget || !point.IsValid)
33 {
34 return;
35 }
36 Vector3 a = *point.PositionTopdown();
37 this.srHighlight.transform.position = a + this.fixHighlight;
38 int mouseGridX = TilemapUtils.GetMouseGridX(this.fogmap, EMono.scene.cam);
39 int mouseGridY = TilemapUtils.GetMouseGridY(this.fogmap, EMono.scene.cam);
40 if (EMono.debug.enable && Input.GetMouseButtonDown(2))
41 {
42 this.elomap.GetTileInfo(mouseGridX, mouseGridY);
43 }
44 }
45
46 // Token: 0x06000C64 RID: 3172 RVA: 0x0005C9A8 File Offset: 0x0005ABA8
47 public void OnUpdateInput()
48 {
49 int mouseGridX = TilemapUtils.GetMouseGridX(this.fogmap, EMono.scene.cam);
50 int mouseGridY = TilemapUtils.GetMouseGridY(this.fogmap, EMono.scene.cam);
51 if (this.elomap.GetCell(mouseGridX, mouseGridY) != null && (mouseGridX != this.gx || mouseGridY != this.gy))
52 {
53 this.gx = mouseGridX;
54 this.gy = mouseGridY;
55 this.hasTargetChanged = true;
56 this.textMouseOver = "";
57 Zone zone = this.elomap.GetZone(this.gx, this.gy);
58 if (zone != null)
59 {
60 this.textMouseOver = this.textMouseOver + " " + zone.Name;
61 }
62 this.srHighlight.transform.position = TilemapUtils.GetGridWorldPos(this.fogmap, this.gx, this.gy);
63 }
64 else
65 {
66 this.hasTargetChanged = false;
67 }
68 if (EMono.debug.enable)
69 {
70 this.elomap.GetTileInfo(this.gx, this.gy);
71 }
72 bool enable = !EMono.ui.isPointerOverUI;
73 this.srHighlight.SetActive(enable);
74 this.srHighlight2.SetActive(false);
75 bool isActive = ActionMode.Title.IsActive;
76 this.srEmbarkPoint.SetActive(isActive);
77 if (isActive)
78 {
79 this.srEmbarkPoint.transform.position = TilemapUtils.GetGridWorldPos(this.fogmap, EMono.player.zone.x, EMono.player.zone.y);
80 }
81 }
82
83 // Token: 0x04000C2D RID: 3117
84 public EloMapActor actor;
85
86 // Token: 0x04000C2E RID: 3118
87 public SpriteRenderer srHighlight;
88
89 // Token: 0x04000C2F RID: 3119
90 public SpriteRenderer srHighlight2;
91
92 // Token: 0x04000C30 RID: 3120
93 public SpriteRenderer srEmbarkPoint;
94
95 // Token: 0x04000C31 RID: 3121
96 public Vector3 fixHighlight;
97
98 // Token: 0x04000C32 RID: 3122
99 [NonSerialized]
100 public int gx;
101
102 // Token: 0x04000C33 RID: 3123
103 [NonSerialized]
104 public int gy;
105
106 // Token: 0x04000C34 RID: 3124
107 [NonSerialized]
108 public bool hasTargetChanged;
109
110 // Token: 0x04000C35 RID: 3125
111 [NonSerialized]
112 public string textMouseOver;
113}
Definition EMono.cs:6
Definition Point.cs:11
Definition Zone.cs:14