scripts
This commit is contained in:
@@ -0,0 +1,181 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Photon;
|
||||
using UnityEngine;
|
||||
|
||||
namespace RecRoom.Sandbox
|
||||
{
|
||||
// Token: 0x02000E2B RID: 3627
|
||||
public abstract class SandboxGoalBase : global::Photon.MonoBehaviour
|
||||
{
|
||||
// Token: 0x17000DC6 RID: 3526
|
||||
// (get) Token: 0x0601DBC6 RID: 121798 RVA: 0x0081BC90 File Offset: 0x00819E90
|
||||
public Tool BKDFLNGCINH
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.tool;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000DC7 RID: 3527
|
||||
// (get) Token: 0x0601DBC7 RID: 121799 RVA: 0x0081BC98 File Offset: 0x00819E98
|
||||
protected virtual bool IPMGBLHBPBJ
|
||||
{
|
||||
get
|
||||
{
|
||||
return Time.time >= this.OILHLGNJALA + this.minHitInterval && (this.tool.HFPHLDMNLGK == null || this.tool.HFPHLDMNLGK.ACBKNECAIAN);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0601DBC8 RID: 121800 RVA: 0x0081BCE8 File Offset: 0x00819EE8
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
this.tool.DefaultCollisionLayer = this.CollisionLayer;
|
||||
this.tool.GravityPickupMode = Tool.GNLFAODEBOE.DISABLED;
|
||||
this.tool.IgnorePickupDirection = true;
|
||||
this.tool.AlwaysPhysicalPickupOffCenter = true;
|
||||
}
|
||||
|
||||
// Token: 0x0601DBC9 RID: 121801
|
||||
protected abstract void OnTriggerEnter(Collider GGGBDENGHFM);
|
||||
|
||||
// Token: 0x0601DBCA RID: 121802 RVA: 0x0081BD28 File Offset: 0x00819F28
|
||||
protected void MMPFKNJIHJI(Vector3 CIGPHKLAAOD)
|
||||
{
|
||||
if (this.IPMGBLHBPBJ)
|
||||
{
|
||||
base.OMNGGJICBBI.RPC("RpcPlayHitEffect", IHCPDNLJMMD.All, new object[] { CIGPHKLAAOD });
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0601DBCB RID: 121803 RVA: 0x0081BD58 File Offset: 0x00819F58
|
||||
[BCENPNOIAOM]
|
||||
protected void RpcPlayHitEffect(Vector3 CIGPHKLAAOD)
|
||||
{
|
||||
this.HNBCBEPLMED(CIGPHKLAAOD);
|
||||
}
|
||||
|
||||
// Token: 0x0601DBCC RID: 121804 RVA: 0x0081BD64 File Offset: 0x00819F64
|
||||
protected virtual void HNBCBEPLMED(Vector3 CIGPHKLAAOD)
|
||||
{
|
||||
if (this.IPMGBLHBPBJ)
|
||||
{
|
||||
if (this.hitParticles != null)
|
||||
{
|
||||
PooledParticle pooledParticle = ObjectPool.NCKMBFBMBFM.Acquire<PooledParticle>(this.hitParticles);
|
||||
pooledParticle.Play(CIGPHKLAAOD, base.transform.rotation, false);
|
||||
}
|
||||
if (this.hitAudio != null)
|
||||
{
|
||||
AudioManager.Play3DSFX(this.hitAudio, base.transform, this.hitAudioRolloff);
|
||||
}
|
||||
this.MAJNJMFPAEI(this.NKPODPNPBAC);
|
||||
this.NKPODPNPBAC = base.StartCoroutine(this.JOGGBDFJHNE());
|
||||
this.OILHLGNJALA = Time.time;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0601DBCD RID: 121805 RVA: 0x0081BE00 File Offset: 0x0081A000
|
||||
private IEnumerator JOGGBDFJHNE()
|
||||
{
|
||||
MaterialPropertyBlock materialPropertyBlock = new MaterialPropertyBlock();
|
||||
for (int i = 0; i < this.hitFlashCount; i++)
|
||||
{
|
||||
for (float num = 0f; num < this.hitFlashDuration + this.hitFlashFadeDuration; num += Time.deltaTime)
|
||||
{
|
||||
float num2 = 1f - Mathf.Clamp01((num - this.hitFlashDuration) / this.hitFlashFadeDuration);
|
||||
num2 *= this.hitFlashIntensity;
|
||||
for (int j = 0; j < this.hitFlashRenderers.Length; j++)
|
||||
{
|
||||
Renderer renderer = this.hitFlashRenderers[j];
|
||||
this.LELLMHNFKPB(renderer, materialPropertyBlock, KJKLAHAJCJM.MKMGLEEEONG, this.hitFlashColor, num2);
|
||||
this.LELLMHNFKPB(renderer, materialPropertyBlock, KJKLAHAJCJM.GCNLMGEBNOA, this.hitFlashColor, num2);
|
||||
this.LELLMHNFKPB(renderer, materialPropertyBlock, KJKLAHAJCJM.DCGEIGAILFA, this.hitFlashColor, num2);
|
||||
renderer.SetPropertyBlock(materialPropertyBlock);
|
||||
}
|
||||
yield return null;
|
||||
}
|
||||
materialPropertyBlock.Clear();
|
||||
for (int k = 0; k < this.hitFlashRenderers.Length; k++)
|
||||
{
|
||||
this.hitFlashRenderers[k].SetPropertyBlock(materialPropertyBlock);
|
||||
}
|
||||
yield return new WaitForSeconds(this.hitFlashInterval);
|
||||
}
|
||||
yield break;
|
||||
}
|
||||
|
||||
// Token: 0x0601DBCE RID: 121806 RVA: 0x0081BE1C File Offset: 0x0081A01C
|
||||
private void LELLMHNFKPB(Renderer JGDAEIHOEPA, MaterialPropertyBlock GMADLIBFGHA, int KBNNELEGMHF, Color ILDIEKHFJLD, float GIDMADJPECM)
|
||||
{
|
||||
if (JGDAEIHOEPA.sharedMaterial.HasProperty(KBNNELEGMHF))
|
||||
{
|
||||
Color color = Color.Lerp(JGDAEIHOEPA.sharedMaterial.GetColor(KBNNELEGMHF), ILDIEKHFJLD, GIDMADJPECM);
|
||||
GMADLIBFGHA.SetColor(KBNNELEGMHF, color);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04004DC6 RID: 19910
|
||||
[ENMFCLPAKBJ(FOGKDGELKHN.Self, false)]
|
||||
[SerializeField]
|
||||
protected Tool tool;
|
||||
|
||||
// Token: 0x04004DC7 RID: 19911
|
||||
[SerializeField]
|
||||
private NILFAGNKNMH CollisionLayer = NILFAGNKNMH.DynamicPhysicsIgnoreDynamicAndPlayerPhysics;
|
||||
|
||||
// Token: 0x04004DC8 RID: 19912
|
||||
[SerializeField]
|
||||
private float minHitInterval = 0.5f;
|
||||
|
||||
// Token: 0x04004DC9 RID: 19913
|
||||
[SerializeField]
|
||||
[Header("Hit effects")]
|
||||
private PooledParticle hitParticles;
|
||||
|
||||
// Token: 0x04004DCA RID: 19914
|
||||
[SerializeField]
|
||||
private RecRoomAudioClip hitAudio;
|
||||
|
||||
// Token: 0x04004DCB RID: 19915
|
||||
[SerializeField]
|
||||
private AudioRolloff hitAudioRolloff;
|
||||
|
||||
// Token: 0x04004DCC RID: 19916
|
||||
[SerializeField]
|
||||
[Header("Flashing")]
|
||||
private Renderer[] hitFlashRenderers;
|
||||
|
||||
// Token: 0x04004DCD RID: 19917
|
||||
[SerializeField]
|
||||
private Color hitFlashColor = Color.white;
|
||||
|
||||
// Token: 0x04004DCE RID: 19918
|
||||
[SerializeField]
|
||||
private float hitFlashIntensity = 0.3f;
|
||||
|
||||
// Token: 0x04004DCF RID: 19919
|
||||
[SerializeField]
|
||||
private int hitFlashCount = 1;
|
||||
|
||||
// Token: 0x04004DD0 RID: 19920
|
||||
[SerializeField]
|
||||
private float hitFlashDuration = 0.3f;
|
||||
|
||||
// Token: 0x04004DD1 RID: 19921
|
||||
[SerializeField]
|
||||
private float hitFlashFadeDuration = 0.3f;
|
||||
|
||||
// Token: 0x04004DD2 RID: 19922
|
||||
[SerializeField]
|
||||
private float hitFlashInterval = 0.3f;
|
||||
|
||||
// Token: 0x04004DD3 RID: 19923
|
||||
private float OILHLGNJALA;
|
||||
|
||||
// Token: 0x04004DD4 RID: 19924
|
||||
private Coroutine NKPODPNPBAC;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user