Add source files
This commit is contained in:
60
Projects/BanquetForFools/Source/Assembly-CSharp/Billboard.cs
Normal file
60
Projects/BanquetForFools/Source/Assembly-CSharp/Billboard.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
// Token: 0x02000096 RID: 150
|
||||
public class Billboard : MonoBehaviour
|
||||
{
|
||||
// Token: 0x06000E63 RID: 3683 RVA: 0x00114611 File Offset: 0x00112811
|
||||
private void OnEnable()
|
||||
{
|
||||
this.GetVariables();
|
||||
}
|
||||
|
||||
// Token: 0x06000E64 RID: 3684 RVA: 0x0011461C File Offset: 0x0011281C
|
||||
public void GetVariables()
|
||||
{
|
||||
if (!this.tr)
|
||||
{
|
||||
this.tr = base.transform;
|
||||
}
|
||||
if (Links.x.rallyStage.playing && this.inRally)
|
||||
{
|
||||
this.camTr = Links.x.rallyStage.rallyCamera.gameObject.transform;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.camTr = Links.x.rtsCamera.tr;
|
||||
}
|
||||
this.forw = Vector3.forward;
|
||||
this.up = Vector3.up;
|
||||
this.hasVars = true;
|
||||
}
|
||||
|
||||
// Token: 0x06000E65 RID: 3685 RVA: 0x001146B0 File Offset: 0x001128B0
|
||||
private void LateUpdate()
|
||||
{
|
||||
if (!this.hasVars)
|
||||
{
|
||||
this.GetVariables();
|
||||
}
|
||||
this.tr.LookAt(this.tr.position + this.camTr.rotation * this.forw, this.camTr.rotation * this.up);
|
||||
}
|
||||
|
||||
// Token: 0x040016E3 RID: 5859
|
||||
private Transform tr;
|
||||
|
||||
// Token: 0x040016E4 RID: 5860
|
||||
private Transform camTr;
|
||||
|
||||
// Token: 0x040016E5 RID: 5861
|
||||
private Vector3 forw;
|
||||
|
||||
// Token: 0x040016E6 RID: 5862
|
||||
private Vector3 up;
|
||||
|
||||
// Token: 0x040016E7 RID: 5863
|
||||
private bool hasVars;
|
||||
|
||||
// Token: 0x040016E8 RID: 5864
|
||||
public bool inRally;
|
||||
}
|
||||
Reference in New Issue
Block a user