Ejemplo n.º 1
0
        private static MevoPoint GetNewSpawn(MevoUniverse uni)
        {
            double radius = MevoUtils.Rand.NextDouble() * uni.SpawnRadius;

            double radian = MevoUtils.Deg2Rad(MevoUtils.Rand.Next(360));

            MevoPoint pnt = new MevoPoint();

            pnt.X = uni.CenterOfMass.X + (int)(radius * Math.Cos(radian));
            pnt.Y = uni.CenterOfMass.Y + (int)(radius * Math.Sin(radian));
            return(pnt);
        }
Ejemplo n.º 2
0
        private MevoPoint GetSpawnPoint()
        {
            double radius = MevoUtils.Rand.NextDouble() * SpawnRadius;

            double radian = MevoUtils.Deg2Rad(MevoUtils.Rand.Next(360));

            MevoPoint pnt = new MevoPoint();

            pnt.X = CenterOfMass.X + (int)(radius * Math.Cos(radian));
            pnt.Y = CenterOfMass.Y + (int)(radius * Math.Sin(radian));
            return(pnt);
        }
Ejemplo n.º 3
0
        public void Initialize(MevoUniverseConfig conf)
        {
            Config       = conf;
            Width        = conf.InitWidth;
            Height       = conf.InitHeight;
            SpawnRadius  = conf.SpawnRadiusInit;
            CenterOfMass = new MevoPoint {
                X = Width / 2, Y = Height / 2
            };

            SpawnElement(MevoElementType.CIRCLE);
            SpawnElement(MevoElementType.TRIANGLE);
            SpawnElement(MevoElementType.SQUARE);
        }
Ejemplo n.º 4
0
 private static bool SpawnValid(MevoPoint p, MevoUniverse uni)
 {
     return(true);
 }