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);
        }