/// <summary> /// constructor /// </summary> public InteractiveObject(String name, int lifePoints, TgcMesh mesh, Materials material, ObjectTypes type) { this.name = name; this.lifePoints = lifePoints; this.mesh = mesh; this.material = material; this.objectType = type; if (material.Equals(Materials.Plant)) { this.Solid = false; } }
private BlockLookup BlockLookup(List <BlockLookup> blocknames, string[] beBlocknames, short blockID) { return(Materials.Equals("Pocket") ? blocknames.Where(a => a.Name == beBlocknames[blockID]) .DefaultIfEmpty(new BlockLookup { Name = "air" }) .FirstOrDefault() : blocknames.Where(a => a.Id == blockID).DefaultIfEmpty(new BlockLookup { Name = "air" }).FirstOrDefault()); }