/* * ShipIdentifier.script * Authors: * Copyright (c) 2007-2008 Cornell University This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // css - C Sharp Script file // just like C# code // called by CSharpHelper.doSimpleFile("ShipIdentifier.css", 'MaritimeDefender object', "game"); int screenWidth = game.GraphicsDevice.Viewport.Width; int screenHeight = game.GraphicsDevice.Viewport.Width; MaritimeDefender.Entity enemyBackground = new MaritimeDefender.Entity("MiniGames/MMEnemyBackground"); enemyBackground.LoadContent(game.Content); enemyBackground.X = screenWidth * (0.25f); enemyBackground.Y = screenHeight * (0.275f); enemyBackground.Z = .01f; enemyBackground.Width = screenWidth * (0.50f); enemyBackground.Height = screenHeight * (0.575f); game.mEntities.Add(enemyBackground); MaritimeDefender.Entity friendlyBackground = new MaritimeDefender.Entity("MiniGames/MMFriendlyBackground"); friendlyBackground.LoadContent(game.Content); friendlyBackground.X = screenWidth * (0.75f); friendlyBackground.Y = screenHeight * (0.275f); friendlyBackground.Z = .01f; friendlyBackground.Width = screenWidth * (0.50f); friendlyBackground.Height = screenHeight * (0.575f); game.mEntities.Add(friendlyBackground); MaritimeDefender.Entity enemyShipSchematic = new MaritimeDefender.Entity(game.BogieSchematicPath); enemyShipSchematic.LoadContent(game.Content); enemyShipSchematic.X = screenWidth * (0.25f); enemyShipSchematic.Y = screenHeight * (0.275f); enemyShipSchematic.Z = .001f; enemyShipSchematic.Width = screenWidth * (0.50f); enemyShipSchematic.Height = screenHeight * (0.575f); game.mEntities.Add(enemyShipSchematic); MaritimeDefender.Entity friendlyShipSchematic = new MaritimeDefender.Entity(game.FriendlySchematicPath); friendlyShipSchematic.LoadContent(game.Content); friendlyShipSchematic.X = screenWidth * (0.75f); friendlyShipSchematic.Y = screenHeight * (0.275f); friendlyShipSchematic.Z = .001f; friendlyShipSchematic.Width = screenWidth * (0.50f); friendlyShipSchematic.Height = screenHeight * (0.575f); game.mEntities.Add(friendlyShipSchematic); System.Collections.Generic.List dialogs = new System.Collections.Generic.List(); dialogs.Add(new Util.Dialog("BASE CONTROL BOT", "Instead of building their own ships, hostile forces hijack ships from others. This time, hostiles are flying the ship on the LEFT and friends are in the ship on the RIGHT.", "Portraits/Robot1", Util.Corner.BottomLeft, 0, true)); dialogs.Add(new Util.Dialog("BASE CONTROL BOT", "Take a moment to study which kind of ship is friendly and which is hostile.", "Portraits/Robot1", Util.Corner.BottomLeft, 0, true)); return new Util.DialogScreen(dialogs);