Elin Modding Docs Doc
Loading...
Searching...
No Matches
AM_Region.cs
1using System;
2using UnityEngine;
3
4// Token: 0x0200015D RID: 349
5public class AM_Region : AM_Adv
6{
7 // Token: 0x17000299 RID: 665
8 // (get) Token: 0x06000A54 RID: 2644 RVA: 0x0003EDC0 File Offset: 0x0003CFC0
9 public override float TargetZoom
10 {
11 get
12 {
13 return 0.01f * (float)EClass.game.config.regionZoom;
14 }
15 }
16
17 // Token: 0x06000A55 RID: 2645 RVA: 0x0003EDD8 File Offset: 0x0003CFD8
18 public override void OnRenderTile(Point point, HitResult result, int dir)
19 {
20 EClass.screen.tileSelector.OnRenderTile(point, result, base.ShouldHideTile);
21 }
22
23 // Token: 0x06000A56 RID: 2646 RVA: 0x0003EDF4 File Offset: 0x0003CFF4
24 public override void RefreshArrow()
25 {
26 this.posOrigin = CursorSystem.posOrigin;
27 this.posArrow = CursorSystem.position;
28 float num;
29 if (this.cursorMove || EClass.pc.pos.Distance(base.hit) > 1)
30 {
31 num = Util.GetAngle(this.posArrow.x - this.posOrigin.x, this.posArrow.y - this.posOrigin.y) + 90f + 22.5f;
32 }
33 else
34 {
35 num = Util.GetAngle((float)(EClass.pc.pos.x - base.hit.x), (float)(EClass.pc.pos.z - base.hit.z)) - 45f - 22.5f;
36 if (num < 0f)
37 {
38 num = 360f + num;
39 }
40 }
41 if (WidgetUnityChan.Instance)
42 {
43 WidgetUnityChan.Instance.Refresh(num);
44 }
45 if (this.clickPos != Vector3.zero)
46 {
47 if (Vector3.Distance(Input.mousePosition, this.clickPos) < EClass.core.config.game.angleMargin)
48 {
49 return;
50 }
51 this.clickPos = Vector3.zero;
52 }
53 this.vArrow = Vector2.zero;
54 int _angle = 0;
55 Action<int, int, int, int> action = delegate(int x, int y, int i, int a)
56 {
57 this.vArrow.x = (float)x;
58 this.vArrow.y = (float)y;
59 this.arrowIndex = i;
60 _angle = -a;
61 };
62 if (num < 45f || num >= 360f)
63 {
64 action(-1, 0, 0, 0);
65 return;
66 }
67 if (num < 90f)
68 {
69 action(-1, 1, 1, 35);
70 return;
71 }
72 if (num < 135f)
73 {
74 action(0, 1, 2, 90);
75 return;
76 }
77 if (num < 180f)
78 {
79 action(1, 1, 3, 145);
80 return;
81 }
82 if (num < 225f)
83 {
84 action(1, 0, 4, 180);
85 return;
86 }
87 if (num < 270f)
88 {
89 action(1, -1, 5, 215);
90 return;
91 }
92 if (num < 315f)
93 {
94 action(0, -1, 6, 270);
95 return;
96 }
97 action(-1, -1, 7, 325);
98 }
99
100 // Token: 0x04000920 RID: 2336
101 public Point posHighlight;
102}
Definition Point.cs:11