I need to spawn up to 81 entities of one type. The entity has several properties like weight and colour. So I created a new class “Sphere” and planned to load the asset and add it to “Entities” in the constructor. However, this throws an error:
An object reference is required for the non-static field, method, or property ‘GameBase.Asset’
public class Sphere
{
Entity Entity { get; set; }
int weight { get; set; }
public Sphere()
{
this.Entity = Asset.Load<Entity>("sphereEntity");
Entities.Add(this.Entity);
}
}
Any ideas how to solve this?