SHADE_Y3/Assets/Scripts/Gameplay/SC_Item.cs

38 lines
640 B
C#

using SHADE;
using System;
public class Item : Script
{
public enum ItemCategory
{
LIGHT,
MEDIUM,
HEAVY
}
public int Score = 10;
public ItemCategory currCategory;
private RigidBody rb;
private Collider collider;
protected override void awake()
{
collider = GetComponent<Collider>();
if (collider)
{
collider.GetCollisionShape(0).Density = 1;
}
rb = GetComponent<RigidBody>();
if (rb)
{
rb.FreezeRotationX = false;
rb.FreezeRotationY = false;
rb.FreezeRotationZ = false;
}
}
protected override void onTriggerEnter(CollisionInfo info)
{
}
}