Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
PUIExampleRPGStats.cs
Go to the documentation of this file.
1using System;
2using UnityEngine;
3
5
6public class PUIExampleRPGStats : MonoBehaviour
7{
9
11
13
15
16 public float[] stats = new float[5];
17
19
21
23
24 private Vector2 chartCenter = new Vector2(0.7f, 0.5f);
25
26 private float chartRadius = 0.2f;
27
28 private float fix1 = 72.5f;
29
31
33
35
37
38 private void Awake()
39 {
44 }
45
46 public void Draw()
47 {
48 float[] array = new float[5];
49 for (int i = 0; i < 5; i++)
50 {
51 array[i] = stats[i] / 100f * chartRadius;
52 }
57 Vector2 vector = new Vector2(chartRadius, chartRadius * primitiveCanvas.aspectRatio);
58 float num = MathF.PI * 2f / 5f;
59 float num2 = MathF.PI / 2f - fix1 * (MathF.PI / 180f);
60 for (int j = 0; j < 5; j++)
61 {
62 Vector2 point = new Vector2(Mathf.Cos(num2 - num * (float)j) * vector.x + chartCenter.x, Mathf.Sin(num2 - num * (float)j) * vector.y + chartCenter.y);
64 }
66 }
67}
void DrawRegularSolid(Vector2 center, float radius, int sides, Color fillColor)
void DrawIrregularSolid(Vector2 center, float[] radii, Color fillColor)
void DrawLine(Vector2 point1, Vector2 point2)