Elin Modding Docs Doc
All Classes Namespaces
RandomPositionMover.cs
1using System;
2using UnityEngine;
3
4// Token: 0x02000122 RID: 290
5public class RandomPositionMover : MonoBehaviour
6{
7 // Token: 0x060007D7 RID: 2007 RVA: 0x00032A20 File Offset: 0x00030C20
8 private void Start()
9 {
10 if (this.pickerInterval == 0f)
11 {
12 this.pickerInterval = 3f;
13 }
14 this.randomPointInCircle = Vector2.zero;
15 base.InvokeRepeating("PickRandomPointInCircle", UnityEngine.Random.Range(0f, this.pickerInterval), this.pickerInterval);
16 }
17
18 // Token: 0x060007D8 RID: 2008 RVA: 0x00032A74 File Offset: 0x00030C74
19 private void PickRandomPointInCircle()
20 {
21 base.transform.position = this.player.transform.position;
22 this.randomPointInCircle = base.transform.localPosition + UnityEngine.Random.insideUnitCircle * this.radius;
23 base.transform.localPosition = this.randomPointInCircle;
24 }
25
26 // Token: 0x060007D9 RID: 2009 RVA: 0x00032ADD File Offset: 0x00030CDD
27 private void Update()
28 {
29 }
30
31 // Token: 0x040007E6 RID: 2022
32 public float pickerInterval;
33
34 // Token: 0x040007E7 RID: 2023
35 public float radius;
36
37 // Token: 0x040007E8 RID: 2024
38 public GameObject player;
39
40 // Token: 0x040007E9 RID: 2025
41 public Vector2 randomPointInCircle;
42}