Files
NobetaSource/Cpp2IL/Assembly-CSharp/Obi/ObiDistanceConstraints.cs
2023-09-06 22:09:22 +02:00

109 lines
3.6 KiB
C#

using System;
using System.Collections.Generic;
using Cpp2IlInjected;
using UnityEngine;
namespace Obi
{
// Token: 0x020004C1 RID: 1217
[Token(Token = "0x20004C1")]
[DisallowMultipleComponent]
public class ObiDistanceConstraints : ObiBatchedConstraints
{
// Token: 0x06002B0D RID: 11021 RVA: 0x0005D588 File Offset: 0x0005B788
[Token(Token = "0x6002B0D")]
[Address(RVA = "0x54BDE0", Offset = "0x54A5E0", VA = "0x18054BDE0", Slot = "8")]
public override Oni.ConstraintType GetConstraintType()
{
return Oni.ConstraintType.Distance;
}
// Token: 0x06002B0E RID: 11022 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002B0E")]
[Address(RVA = "0x10D5740", Offset = "0x10D3F40", VA = "0x1810D5740", Slot = "9")]
public override List<ObiConstraintBatch> GetBatches()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002B0F RID: 11023 RVA: 0x0005D598 File Offset: 0x0005B798
[Token(Token = "0x6002B0F")]
[Address(RVA = "0x10D56E0", Offset = "0x10D3EE0", VA = "0x1810D56E0", Slot = "10")]
public override void Clear()
{
int num = 0;
bool flag = base.RemoveFromSolver(num);
this.batches.Clear();
}
// Token: 0x06002B10 RID: 11024 RVA: 0x0005D5C0 File Offset: 0x0005B7C0
[Token(Token = "0x6002B10")]
[Address(RVA = "0x10D5640", Offset = "0x10D3E40", VA = "0x1810D5640")]
public void AddBatch(ObiDistanceConstraintBatch batch)
{
if (batch != 0)
{
int constraintType = (int)batch.GetConstraintType();
Oni.ConstraintType constraintType2 = this.GetConstraintType();
if (constraintType == (int)constraintType2)
{
this.batches.Add(batch);
}
}
}
// Token: 0x06002B11 RID: 11025 RVA: 0x0005D5F8 File Offset: 0x0005B7F8
[Token(Token = "0x6002B11")]
[Address(RVA = "0x10D5BB0", Offset = "0x10D43B0", VA = "0x1810D5BB0")]
public void RemoveBatch(ObiDistanceConstraintBatch batch)
{
bool flag = this.batches.Remove(batch);
}
// Token: 0x06002B12 RID: 11026 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6002B12")]
[Address(RVA = "0x10D5870", Offset = "0x10D4070", VA = "0x1810D5870")]
public void OnDrawGizmosSelected()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06002B13 RID: 11027 RVA: 0x0005D618 File Offset: 0x0005B818
[Token(Token = "0x6002B13")]
[Address(RVA = "0x10D5C10", Offset = "0x10D4410", VA = "0x1810D5C10")]
public ObiDistanceConstraints()
{
List<ObiDistanceConstraintBatch> list = new List();
this.batches = list;
base..ctor();
}
// Token: 0x040033BC RID: 13244
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x40033BC")]
[Tooltip("Scale of stretching constraints. Values > 1 will expand initial cloth size, values < 1 will make it shrink.")]
public float stretchingScale = 1f;
// Token: 0x040033BD RID: 13245
[FieldOffset(Offset = "0x34")]
[Token(Token = "0x40033BD")]
[Range(0f, 1f)]
[Tooltip("Cloth resistance to stretching. Lower values will yield more elastic cloth.")]
public float stiffness = 1f;
// Token: 0x040033BE RID: 13246
[FieldOffset(Offset = "0x38")]
[Token(Token = "0x40033BE")]
[Range(0f, 1f)]
[Tooltip("Amount of compression slack. 0 means total resistance to compression, 1 no resistance at all. 0.5 means constraints will allow a compression of up to 50% of their rest length.")]
public float slack;
// Token: 0x040033BF RID: 13247
[FieldOffset(Offset = "0x40")]
[Token(Token = "0x40033BF")]
[SerializeField]
[HideInInspector]
private List<ObiDistanceConstraintBatch> batches;
}
}