示例#1
0
 public void TakeFlag(Flag f, SpaceShip ship)
 {
     Player p = ship.GetPlayer();
     Announce(p.Name + " has taken the " + Team.ColorNames[f.Team] + " flag!");
 }
        public override void Create()
        {
            Node n, n2;

            Mars = new Mars();
            //Mars.rotationspeed.Y = 15.0f / 180.0f * (float)Math.PI;
            Mars.Position = new Vector3(2000, 0, 3000);
            Spawn(Mars, true);

            Moon = new Moon();
            Moon.rotationspeed.Y = 15.0f / 180.0f * (float)Math.PI;
            Moon.Position = new Vector3(1000, 0, 0);
            Moon.Attach = Mars;
            Spawn(Moon, true);

            n = new Saturn();
            n.rotationspeed.Y = 10.0f / 180.0f * (float)Math.PI;
            n.Orientation = QuaternionExtensions.FromAxisAngle(0, 1, 0, (float)Math.PI);
            n.Position = new Vector3(-2000, 0, 3000);
            Spawn(n, true);

            DominationPoint dp = new DominationPoint();
            dp.Name = "DomPoint 1";
            dp.Position = new Vector3(2000, 0, 2000);
            dp.rotationspeed = new Vector3(0, 1, 0);
            Spawn(dp, false);

            CheckPoint cp = new CheckPoint();
            cp.CheckPointIndex = 0;
            cp.Position = new Vector3(3000, 0, 2000);
            Spawn(cp, true);
            cp = new CheckPoint();
            cp.CheckPointIndex = 1;
            cp.Position = new Vector3(4000, 0, 2000);
            Spawn(cp, true);

            VecRandom r = new VecRandom();
            Vector3 center = new Vector3(-4000, 0, -2000);
            for (int i = 0; i < 20; ++i)
            {
                Vector3 rv = r.NextScaledVector3(3000, 300, 2000);
                n = new Phobos();
                Spawn(n, true);
                float s = 30.0f / 180.0f * (float)Math.PI;
                n.rotationspeed = r.NextScaledVector3(s, s, s);
                n.Position = center + rv;

            }

            //if (Root.Instance is Server)
            {
                n = new SpawnPoint(typeof(Repair), 20);
                n.rotationspeed = new Vector3(0, 1, 0);
                n.Position = new Vector3(-500, 0, 0);
                Spawn(n, true);
            }
            {
                n = new SpawnPoint(typeof(MissilePickup), 30);
                n.rotationspeed = new Vector3(0, 1, 0);
                n.Position = new Vector3(2000, 0, -1000);
                Spawn(n, true);
            }

            {
                n = new PlayerStart();
                n.rotationspeed = new Vector3(0, 1, 0);
                n.Position = new Vector3(4000, 0, 4000);
                Spawn(n, true);
            }
            {
                n = new PlayerStart();
                n.rotationspeed = new Vector3(0, 1, 0);
                n.Position = new Vector3(-4000, 0, -4000);
                Spawn(n, true);
            }
            {
                n = new PlayerStart();
                n.rotationspeed = new Vector3(0, 1, 0);
                n.Position = new Vector3(-4000, 0, 4000);
                Spawn(n, true);
            }
            {
                n = new PlayerStart();
                n.rotationspeed = new Vector3(0, 1, 0);
                n.Position = new Vector3(4000, 0, -4000);
                Spawn(n, true);
            }

            {
                n = new Flag(1, new Vector3(4800, 0, -4800));
                Spawn(n, false);
            }
            {
                n = new Flag(0, new Vector3(4400, 0, -4400));
                Spawn(n, false);
            }

            //ParticleNebula pn = new ParticleNebula();
            n = new Nebula();
            //n.Draw.Add(pn);
            //n.Transparent = true;
            n.Position = new Vector3(0, 0, 0);
            Spawn(n, true);

            n = new Nebula();
            //n.Draw.Add(pn);
            //n.Transparent = true;
            n.Position = new Vector3(100, 0, 600);
            Spawn(n, true);

            //n = new LaserTurret();
            //n = new Nebula();
            //n.Draw.Add(pn);
            n = new PornCinema();

            //Text3D tx = new Cheetah.Text3D("abcabcabc", (MeshFont)Root.Instance.ResourceManager.Load("models/font-arial-black", typeof(MeshFont)));
            //n.Draw.Add(tx);
            n.Position = new Vector3(300, 0, 1200);
            n.Orientation = QuaternionExtensions.FromAxisAngle(0, 1, 0, (float)Math.PI);
            Spawn(n, true);

            //n = new TestShip();
            //Root.Instance.Scene.Spawn(n);
            //n.Position = new Vector3(400, 0, 0);

            Light l = new Light();
            l.directional = true;
            l.Position = Vector3Extensions.GetUnit(new Vector3(1, 3, 4));
            //l.directional = false;

            l.diffuse = new Color4f(0.5f, 0.8f, 1.0f, 1);
            Spawn(l, true);

            l = new Light();
            l.Position = new Vector3(0, 0, 0);
            l.directional = false;
            l.diffuse = new Color4f(1, 0, 0, 1);
            Spawn(l, true);

            n = new EclipticNode();
            //n.Draw.Add(new Ecliptic(new Color3f(0, 0, 0.5f), 10000, 100));
            Spawn(n, true);

            //Spawn(new RandomSpawn(typeof(SpaceWar2006.Planets.PhobosAsteroid), 1, 1), true);
        }
示例#3
0
 public void ReturnFlag(Flag f, SpaceShip ship)
 {
     if (ship != null)
     {
         Player p = ship.GetPlayer();
         Announce(p.Name + " returned the " + Team.ColorNames[f.Team] + " flag!");
     }
     else
     {
         Announce("The " + Team.ColorNames[f.Team] + " flag was returned.");
     }
 }
示例#4
0
 public void DropFlag(Flag f, SpaceShip ship)
 {
     Player p = ship.GetPlayer();
     Announce(p.Name + " dropped the " + Team.ColorNames[f.Team] + " flag!");
 }
示例#5
0
 public void CaptureFlag(Flag f, SpaceShip ship)
 {
     Player p = ship.GetPlayer();
     Announce(p.Name + " captured the " + Team.ColorNames[f.Team] + " flag!");
     int cap = ++((CtfTeam)Teams[p.Team]).Captures;
     if (cap >= CaptureLimit && CaptureLimit > 0)
     {
         Announce(Team.ColorNames[p.Team] + " wins the match!");
         EndGame();
     }
 }
示例#6
0
 public override void Create()
 {
     {
         SpaceWar2006.Effects.EclipticNode e = new SpaceWar2006.Effects.EclipticNode();
         e.Position      = new Vector3(0f, 0f, 0f);
         e.rotationspeed = new Vector3(0f, 0f, 0f);
         e.Orientation   = new Quaternion(0f, 0f, 0f, 1f);
         Spawn(e, true);
     }
     {
         SpaceWar2006.GameObjects.Flag e = new SpaceWar2006.GameObjects.Flag();
         e.FlagPosition  = e.Position = new Vector3(-4180f, 0f, 120f);
         e.rotationspeed = new Vector3(0f, 0f, 0f);
         e.Orientation   = new Quaternion(0f, 0f, 0f, 1f);
         e.Team          = 0;
         Spawn(e, true);
     }
     {
         SpaceWar2006.GameObjects.Flag e = new SpaceWar2006.GameObjects.Flag();
         e.FlagPosition  = e.Position = new Vector3(4120f, 0f, 230f);
         e.rotationspeed = new Vector3(0f, 0f, 0f);
         e.Orientation   = new Quaternion(0f, 0f, 0f, 1f);
         e.Team          = 1;
         Spawn(e, true);
     }
     {
         SpaceWar2006.GameObjects.PlayerStart e = new SpaceWar2006.GameObjects.PlayerStart();
         e.Position      = new Vector3(410f, 0f, 3970f);
         e.rotationspeed = new Vector3(0f, 0f, 0f);
         e.Orientation   = new Quaternion(0f, 0f, 0f, 1f);
         Spawn(e, true);
     }
     {
         SpaceWar2006.GameObjects.PlayerStart e = new SpaceWar2006.GameObjects.PlayerStart();
         e.Position      = new Vector3(570f, 0f, -4020f);
         e.rotationspeed = new Vector3(0f, 0f, 0f);
         e.Orientation   = new Quaternion(0f, 0f, 0f, 1f);
         Spawn(e, true);
     }
     {
         SpaceWar2006.GameObjects.PlayerStart e = new SpaceWar2006.GameObjects.PlayerStart();
         e.Position      = new Vector3(0f, 0f, 0f);
         e.rotationspeed = new Vector3(0f, 0f, 0f);
         e.Orientation   = new Quaternion(0f, 0f, 0f, 1f);
         Spawn(e, true);
     }
     {
         SpaceWar2006.Planets.Mars e = new SpaceWar2006.Planets.Mars();
         e.Position      = new Vector3(810f, 0f, 1170f);
         e.rotationspeed = new Vector3(0f, 0f, 0f);
         e.Orientation   = new Quaternion(0f, 0f, 0f, 1f);
         Spawn(e, true);
     }
     {
         SpaceWar2006.Planets.Phobos e = new SpaceWar2006.Planets.Phobos();
         e.Position      = new Vector3(-920f, 0f, 350f);
         e.rotationspeed = new Vector3(0f, 0f, 0f);
         e.Orientation   = new Quaternion(0f, 0f, 0f, 1f);
         Spawn(e, true);
     }
     {
         SpaceWar2006.Planets.Phobos e = new SpaceWar2006.Planets.Phobos();
         e.Position      = new Vector3(-1080f, 0f, -70f);
         e.rotationspeed = new Vector3(0f, 0f, 0f);
         e.Orientation   = new Quaternion(0f, 0f, 0f, 1f);
         Spawn(e, true);
     }
     {
         SpaceWar2006.Planets.Phobos e = new SpaceWar2006.Planets.Phobos();
         e.Position      = new Vector3(-860f, 0f, 800f);
         e.rotationspeed = new Vector3(0f, 0f, 0f);
         e.Orientation   = new Quaternion(0f, 0f, 0f, 1f);
         Spawn(e, true);
     }
     {
         SpaceWar2006.Planets.Phobos e = new SpaceWar2006.Planets.Phobos();
         e.Position      = new Vector3(-1170f, 0f, -980f);
         e.rotationspeed = new Vector3(0f, 0f, 0f);
         e.Orientation   = new Quaternion(0f, 0f, 0f, 1f);
         Spawn(e, true);
     }
     {
         SpaceWar2006.Planets.Phobos e = new SpaceWar2006.Planets.Phobos();
         e.Position      = new Vector3(-380f, 0f, 440f);
         e.rotationspeed = new Vector3(0f, 0f, 0f);
         e.Orientation   = new Quaternion(0f, 0f, 0f, 1f);
         Spawn(e, true);
     }
     {
         SpaceWar2006.Planets.Phobos e = new SpaceWar2006.Planets.Phobos();
         e.Position      = new Vector3(-850f, 0f, -1550f);
         e.rotationspeed = new Vector3(0f, 0f, 0f);
         e.Orientation   = new Quaternion(0f, 0f, 0f, 1f);
         Spawn(e, true);
     }
     {
         SpaceWar2006.Planets.Phobos e = new SpaceWar2006.Planets.Phobos();
         e.Position      = new Vector3(-520f, 0f, -800f);
         e.rotationspeed = new Vector3(0f, 0f, 0f);
         e.Orientation   = new Quaternion(0f, 0f, 0f, 1f);
         Spawn(e, true);
     }
     {
         SpaceWar2006.Planets.Phobos e = new SpaceWar2006.Planets.Phobos();
         e.Position      = new Vector3(1350f, 0f, -590f);
         e.rotationspeed = new Vector3(0f, 0f, 0f);
         e.Orientation   = new Quaternion(0f, 0f, 0f, 1f);
         Spawn(e, true);
     }
     {
         SpaceWar2006.Planets.Phobos e = new SpaceWar2006.Planets.Phobos();
         e.Position      = new Vector3(20f, 0f, -1380f);
         e.rotationspeed = new Vector3(0f, 0f, 0f);
         e.Orientation   = new Quaternion(0f, 0f, 0f, 1f);
         Spawn(e, true);
     }
     {
         SpaceWar2006.Planets.Phobos e = new SpaceWar2006.Planets.Phobos();
         e.Position      = new Vector3(160f, 0f, -2340f);
         e.rotationspeed = new Vector3(0f, 0f, 0f);
         e.Orientation   = new Quaternion(0f, 0f, 0f, 1f);
         Spawn(e, true);
     }
     {
         SpaceWar2006.Planets.Saturn e = new SpaceWar2006.Planets.Saturn();
         e.Position      = new Vector3(-2560f, 0f, 1090f);
         e.rotationspeed = new Vector3(0f, 0f, 0f);
         e.Orientation   = new Quaternion(0f, 0f, 0f, 1f);
         Spawn(e, true);
     }
     {
         SpaceWar2006.GameObjects.Nebula e = new SpaceWar2006.GameObjects.Nebula();
         e.Position      = new Vector3(1340f, 0f, -160f);
         e.rotationspeed = new Vector3(0f, 0f, 0f);
         e.Orientation   = new Quaternion(0f, 0f, 0f, 1f);
         Spawn(e, true);
     }
     {
         SpaceWar2006.GameObjects.Nebula e = new SpaceWar2006.GameObjects.Nebula();
         e.Position      = new Vector3(950f, 0f, -770f);
         e.rotationspeed = new Vector3(0f, 0f, 0f);
         e.Orientation   = new Quaternion(0f, 0f, 0f, 1f);
         Spawn(e, true);
     }
     {
         SpaceWar2006.GameObjects.Nebula e = new SpaceWar2006.GameObjects.Nebula();
         e.Position      = new Vector3(340f, 0f, -1150f);
         e.rotationspeed = new Vector3(0f, 0f, 0f);
         e.Orientation   = new Quaternion(0f, 0f, 0f, 1f);
         Spawn(e, true);
     }
     {
         SpaceWar2006.GameObjects.LaserTurret e = new SpaceWar2006.GameObjects.LaserTurret();
         e.Position      = new Vector3(-4230f, 0f, -460f);
         e.rotationspeed = new Vector3(0f, 1.121039E-44f, 0f);
         e.Orientation   = new Quaternion(0f, 1.401298E-45f, 0f, -1f);
         Spawn(e, true);
     }
     {
         SpaceWar2006.GameObjects.LaserTurret e = new SpaceWar2006.GameObjects.LaserTurret();
         e.Position      = new Vector3(-4230f, 0f, 640f);
         e.rotationspeed = new Vector3(0f, 1.121039E-44f, 0f);
         e.Orientation   = new Quaternion(0f, 1f, 0f, 1.401298E-45f);
         Spawn(e, true);
     }
     {
         SpaceWar2006.GameObjects.LaserTurret e = new SpaceWar2006.GameObjects.LaserTurret();
         e.Position      = new Vector3(4270f, 0f, -560f);
         e.rotationspeed = new Vector3(0f, 3.724964E-09f, 0f);
         e.Orientation   = new Quaternion(0f, 0.006622077f, 0f, 0.9999786f);
         Spawn(e, true);
     }
     {
         SpaceWar2006.GameObjects.LaserTurret e = new SpaceWar2006.GameObjects.LaserTurret();
         e.Position      = new Vector3(4250f, 0f, 950f);
         e.rotationspeed = new Vector3(0f, 5.673786E-10f, 0f);
         e.Orientation   = new Quaternion(0f, 0.9999781f, 0f, -0.006622082f);
         Spawn(e, true);
     }
 }
示例#7
0
public override void Create(){
{
SpaceWar2006.Effects.EclipticNode e=new SpaceWar2006.Effects.EclipticNode();
e.Position=new Vector3(0f,0f,0f);
e.rotationspeed=new Vector3(0f,0f,0f);
e.Orientation=new Quaternion(0f,0f,0f,1f);
Spawn(e,true);
}
{
SpaceWar2006.GameObjects.Flag e=new SpaceWar2006.GameObjects.Flag();
e.FlagPosition = e.Position=new Vector3(-4180f,0f,120f);
e.rotationspeed=new Vector3(0f,0f,0f);
e.Orientation=new Quaternion(0f,0f,0f,1f);
e.Team=0;
Spawn(e,true);
}
{
SpaceWar2006.GameObjects.Flag e=new SpaceWar2006.GameObjects.Flag();
e.FlagPosition = e.Position=new Vector3(4120f,0f,230f);
e.rotationspeed=new Vector3(0f,0f,0f);
e.Orientation=new Quaternion(0f,0f,0f,1f);
e.Team=1;
Spawn(e,true);
}
{
SpaceWar2006.GameObjects.PlayerStart e=new SpaceWar2006.GameObjects.PlayerStart();
e.Position=new Vector3(410f,0f,3970f);
e.rotationspeed=new Vector3(0f,0f,0f);
e.Orientation=new Quaternion(0f,0f,0f,1f);
Spawn(e,true);
}
{
SpaceWar2006.GameObjects.PlayerStart e=new SpaceWar2006.GameObjects.PlayerStart();
e.Position=new Vector3(570f,0f,-4020f);
e.rotationspeed=new Vector3(0f,0f,0f);
e.Orientation=new Quaternion(0f,0f,0f,1f);
Spawn(e,true);
}
{
SpaceWar2006.GameObjects.PlayerStart e=new SpaceWar2006.GameObjects.PlayerStart();
e.Position=new Vector3(0f,0f,0f);
e.rotationspeed=new Vector3(0f,0f,0f);
e.Orientation=new Quaternion(0f,0f,0f,1f);
Spawn(e,true);
}
{
SpaceWar2006.Planets.Mars e=new SpaceWar2006.Planets.Mars();
e.Position=new Vector3(810f,0f,1170f);
e.rotationspeed=new Vector3(0f,0f,0f);
e.Orientation=new Quaternion(0f,0f,0f,1f);
Spawn(e,true);
}
{
SpaceWar2006.Planets.Phobos e=new SpaceWar2006.Planets.Phobos();
e.Position=new Vector3(-920f,0f,350f);
e.rotationspeed=new Vector3(0f,0f,0f);
e.Orientation=new Quaternion(0f,0f,0f,1f);
Spawn(e,true);
}
{
SpaceWar2006.Planets.Phobos e=new SpaceWar2006.Planets.Phobos();
e.Position=new Vector3(-1080f,0f,-70f);
e.rotationspeed=new Vector3(0f,0f,0f);
e.Orientation=new Quaternion(0f,0f,0f,1f);
Spawn(e,true);
}
{
SpaceWar2006.Planets.Phobos e=new SpaceWar2006.Planets.Phobos();
e.Position=new Vector3(-860f,0f,800f);
e.rotationspeed=new Vector3(0f,0f,0f);
e.Orientation=new Quaternion(0f,0f,0f,1f);
Spawn(e,true);
}
{
SpaceWar2006.Planets.Phobos e=new SpaceWar2006.Planets.Phobos();
e.Position=new Vector3(-1170f,0f,-980f);
e.rotationspeed=new Vector3(0f,0f,0f);
e.Orientation=new Quaternion(0f,0f,0f,1f);
Spawn(e,true);
}
{
SpaceWar2006.Planets.Phobos e=new SpaceWar2006.Planets.Phobos();
e.Position=new Vector3(-380f,0f,440f);
e.rotationspeed=new Vector3(0f,0f,0f);
e.Orientation=new Quaternion(0f,0f,0f,1f);
Spawn(e,true);
}
{
SpaceWar2006.Planets.Phobos e=new SpaceWar2006.Planets.Phobos();
e.Position=new Vector3(-850f,0f,-1550f);
e.rotationspeed=new Vector3(0f,0f,0f);
e.Orientation=new Quaternion(0f,0f,0f,1f);
Spawn(e,true);
}
{
SpaceWar2006.Planets.Phobos e=new SpaceWar2006.Planets.Phobos();
e.Position=new Vector3(-520f,0f,-800f);
e.rotationspeed=new Vector3(0f,0f,0f);
e.Orientation=new Quaternion(0f,0f,0f,1f);
Spawn(e,true);
}
{
SpaceWar2006.Planets.Phobos e=new SpaceWar2006.Planets.Phobos();
e.Position=new Vector3(1350f,0f,-590f);
e.rotationspeed=new Vector3(0f,0f,0f);
e.Orientation=new Quaternion(0f,0f,0f,1f);
Spawn(e,true);
}
{
SpaceWar2006.Planets.Phobos e=new SpaceWar2006.Planets.Phobos();
e.Position=new Vector3(20f,0f,-1380f);
e.rotationspeed=new Vector3(0f,0f,0f);
e.Orientation=new Quaternion(0f,0f,0f,1f);
Spawn(e,true);
}
{
SpaceWar2006.Planets.Phobos e=new SpaceWar2006.Planets.Phobos();
e.Position=new Vector3(160f,0f,-2340f);
e.rotationspeed=new Vector3(0f,0f,0f);
e.Orientation=new Quaternion(0f,0f,0f,1f);
Spawn(e,true);
}
{
SpaceWar2006.Planets.Saturn e=new SpaceWar2006.Planets.Saturn();
e.Position=new Vector3(-2560f,0f,1090f);
e.rotationspeed=new Vector3(0f,0f,0f);
e.Orientation=new Quaternion(0f,0f,0f,1f);
Spawn(e,true);
}
{
SpaceWar2006.GameObjects.Nebula e=new SpaceWar2006.GameObjects.Nebula();
e.Position=new Vector3(1340f,0f,-160f);
e.rotationspeed=new Vector3(0f,0f,0f);
e.Orientation=new Quaternion(0f,0f,0f,1f);
Spawn(e,true);
}
{
SpaceWar2006.GameObjects.Nebula e=new SpaceWar2006.GameObjects.Nebula();
e.Position=new Vector3(950f,0f,-770f);
e.rotationspeed=new Vector3(0f,0f,0f);
e.Orientation=new Quaternion(0f,0f,0f,1f);
Spawn(e,true);
}
{
SpaceWar2006.GameObjects.Nebula e=new SpaceWar2006.GameObjects.Nebula();
e.Position=new Vector3(340f,0f,-1150f);
e.rotationspeed=new Vector3(0f,0f,0f);
e.Orientation=new Quaternion(0f,0f,0f,1f);
Spawn(e,true);
}
{
SpaceWar2006.GameObjects.LaserTurret e=new SpaceWar2006.GameObjects.LaserTurret();
e.Position=new Vector3(-4230f,0f,-460f);
e.rotationspeed=new Vector3(0f,1.121039E-44f,0f);
e.Orientation=new Quaternion(0f,1.401298E-45f,0f,-1f);
Spawn(e,true);
}
{
SpaceWar2006.GameObjects.LaserTurret e=new SpaceWar2006.GameObjects.LaserTurret();
e.Position=new Vector3(-4230f,0f,640f);
e.rotationspeed=new Vector3(0f,1.121039E-44f,0f);
e.Orientation=new Quaternion(0f,1f,0f,1.401298E-45f);
Spawn(e,true);
}
{
SpaceWar2006.GameObjects.LaserTurret e=new SpaceWar2006.GameObjects.LaserTurret();
e.Position=new Vector3(4270f,0f,-560f);
e.rotationspeed=new Vector3(0f,3.724964E-09f,0f);
e.Orientation=new Quaternion(0f,0.006622077f,0f,0.9999786f);
Spawn(e,true);
}
{
SpaceWar2006.GameObjects.LaserTurret e=new SpaceWar2006.GameObjects.LaserTurret();
e.Position=new Vector3(4250f,0f,950f);
e.rotationspeed=new Vector3(0f,5.673786E-10f,0f);
e.Orientation=new Quaternion(0f,0.9999781f,0f,-0.006622082f);
Spawn(e,true);
}
}}}