public void AddDebris(DebrisProperties debrisProperties) { Debug.Assert(!IsBuildable); Building = new Debris(debrisProperties); Node.AddComponent(Building); }
public DebrisProperties GetNewDebris() { int typeId = (int)Math.Round((Debris.Count() - 1) * m_Random.NextDouble()); DebrisPropertiesTemplate t = Debris[typeId]; return(new DebrisProperties { Model = t.Model, Material = t.Material, Scale = (float)(t.MinScale + m_Random.NextDouble() * (t.MaxScale - t.MinScale)), Rotation = (float)(Math.Round(m_Random.NextDouble() * 4) * 90), Type = (DebrisType)typeId }); }