Esempio n. 1
0
 public Entity(Vector2 pos)
 {
     Position      = pos;
     ID            = XXHash.GetHash(pos.x, pos.y).ToString();
     Visualization = null;
     Instantiation = null;
 }
Esempio n. 2
0
        public Random this[Coordinate coordinate]
        {
            get
            {
                if (!rng.ContainsKey(coordinate))
                {
                    int chunkSeed = unchecked ((int)XXHash.GetHash(coordinate.X, coordinate.Y));
                    rng[coordinate] = new Random(chunkSeed);
                }

                return(rng[coordinate]);
            }
        }