コード例 #1
0
        //Spawns an AIShip object in a random position
        public void SpawnAI()
        {
            double xc = Random.NextDouble() * 5000.0;
            double yc = Random.NextDouble() * 5000.0;

            if (!NearOtherObject(xc, yc))
            {
                AIShip aI = new AIShip(xc, yc, this);
                AIShips.Add(aI);
                GameObjects.Add(aI);
            }
        }
コード例 #2
0
        //Spawns an AIShip object in a random position
        public void SpawnAI()
        {
            double xc = Random.NextDouble() * 5000.0;
            double yc = Random.NextDouble() * 5000.0;

            if (!NearOtherObject(xc, yc))
            {
                AIShip aI = new AIShip(xc, yc, this);
                AIShips.Add(aI);
                GameObjects.Add(aI);
                UpdateAnimationEvent(this, new AnimationEventArgs(false, AnimationType.AI, AIShips.Count, 0, 0));
            }
        }