Files
Fishing2/Assets/Scripts/PhysicsTools/SegmentProperties.cs
2026-02-22 18:34:37 +08:00

40 lines
579 B
C#

using System;
namespace PhysicsTools
{
[Serializable]
public class SegmentProperties
{
[Serializable]
public enum Type
{
CYLINDER = 0,
BOX = 1
}
public Type type;
public SegmentPropertiesBase properties;
public SegmentProperties()
{
properties = new SegmentPropertiesCylinder();
type = Type.CYLINDER;
}
public void setType(Type t)
{
switch (t)
{
case Type.BOX:
properties = new SegmentPropertiesBox();
break;
case Type.CYLINDER:
properties = new SegmentPropertiesCylinder();
break;
}
type = t;
}
}
}