Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #4
0
 private static bool SpawnValid(MevoPoint p, MevoUniverse uni)
 {
     return(true);
 }