public Musician(Channel channel) { Channel = channel; CurrentCell = null; CurrentDirection = 0; NextCell = null; Partition = new List<TimeValue<Cell>>(); Position = Vector3.Zero; }
private void NewBornCell(GameTime gameTime, Cell cell, Channel channel) { int indexChannel = Context.Map.Channels.IndexOf(channel != null ? channel : cell.Channel); cell.Life[indexChannel] = 1f; foreach (Cell otherCell in Context.Map.Cells) { float distance = Tools.Distance(cell.Location, otherCell.Location); if (otherCell != cell && otherCell.Clip == null) { //--- Vie des cellules voisines if (distance <= rayon) { float newLife = 1f - (distance / rayon); if (otherCell.Life[indexChannel] < newLife) otherCell.Life[indexChannel] = newLife; } //--- } //--- if (otherCell != cell && distance < rayon) { otherCell.ListWave.Add(new TimeValue<Vector2>(gameTime.TotalGameTime, otherCell.Location - cell.Location)); } //--- } }
public Sample(Channel channel, string fileName) { Frequency = -1f; this.Channel = channel; this.FileName = fileName; }