2022-11-04 17:31:53 +08:00
|
|
|
|
using SHADE;
|
|
|
|
|
using System;
|
|
|
|
|
public class Item : Script
|
|
|
|
|
{
|
|
|
|
|
public enum ItemCategory
|
|
|
|
|
{
|
|
|
|
|
LIGHT,
|
|
|
|
|
MEDIUM,
|
|
|
|
|
HEAVY
|
|
|
|
|
}
|
2022-11-17 12:54:08 +08:00
|
|
|
|
|
2022-11-17 00:23:38 +08:00
|
|
|
|
public int Score = 10;
|
2022-11-04 17:31:53 +08:00
|
|
|
|
|
|
|
|
|
public ItemCategory currCategory;
|
2022-11-20 16:27:39 +08:00
|
|
|
|
private RigidBody rb;
|
2022-11-21 00:12:09 +08:00
|
|
|
|
private Collider collider;
|
2022-11-04 17:31:53 +08:00
|
|
|
|
|
|
|
|
|
protected override void awake()
|
|
|
|
|
{
|
2022-11-21 00:12:09 +08:00
|
|
|
|
collider = GetComponent<Collider>();
|
|
|
|
|
if (collider)
|
|
|
|
|
{
|
|
|
|
|
collider.GetCollisionShape(0).Density = 1;
|
|
|
|
|
}
|
2022-11-20 16:27:39 +08:00
|
|
|
|
rb = GetComponent<RigidBody>();
|
|
|
|
|
if (rb)
|
|
|
|
|
{
|
|
|
|
|
rb.FreezeRotationX = false;
|
|
|
|
|
rb.FreezeRotationY = false;
|
|
|
|
|
rb.FreezeRotationZ = false;
|
|
|
|
|
}
|
2022-11-04 17:31:53 +08:00
|
|
|
|
}
|
2022-11-17 12:54:08 +08:00
|
|
|
|
|
|
|
|
|
protected override void onTriggerEnter(CollisionInfo info)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2022-11-04 17:31:53 +08:00
|
|
|
|
}
|