From: <kro...@us...> - 2007-03-07 20:29:05
|
Revision: 164 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=164&view=rev Author: kroko_koenig Date: 2007-03-07 12:28:56 -0800 (Wed, 07 Mar 2007) Log Message: ----------- Added Paths: ----------- trunk/plugins/MySimon/ trunk/plugins/MySimon/Release/ trunk/plugins/MySimon/Release/Plugins/ trunk/plugins/MySimon/Release/Plugins/Windows/ trunk/plugins/MySimon/Release/Plugins/Windows/MySimon.dll trunk/plugins/MySimon/Release/Skin/ trunk/plugins/MySimon/Release/Skin/Media/ trunk/plugins/MySimon/Release/Skin/Media/MySimon_1.png trunk/plugins/MySimon/Release/Skin/Media/MySimon_1a.png trunk/plugins/MySimon/Release/Skin/Media/MySimon_2.png trunk/plugins/MySimon/Release/Skin/Media/MySimon_2a.png trunk/plugins/MySimon/Release/Skin/Media/MySimon_3.png trunk/plugins/MySimon/Release/Skin/Media/MySimon_3a.png trunk/plugins/MySimon/Release/Skin/Media/MySimon_4.png trunk/plugins/MySimon/Release/Skin/Media/MySimon_4a.png trunk/plugins/MySimon/Release/Skin/MySimon.xml trunk/plugins/MySimon/Release/Skin/Sounds/ trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_a.wav trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_c.wav trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_e.wav trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_err.wav trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_g.wav trunk/plugins/MySimon/Source/ trunk/plugins/MySimon/Source/SimonSay/ trunk/plugins/MySimon/Source/SimonSay/SimonSay/ trunk/plugins/MySimon/Source/SimonSay/SimonSay/MySimon.cs trunk/plugins/MySimon/Source/SimonSay/SimonSay/MySimon.csproj trunk/plugins/MySimon/Source/SimonSay/SimonSay/Properties/ trunk/plugins/MySimon/Source/SimonSay/SimonSay/Properties/AssemblyInfo.cs trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/ trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Debug/ trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/ trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/Core.dll trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/Dialogs.dll trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/MySimon.dll trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/MySimon.pdb trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/Utils.dll trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/copy.bat trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/ trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Debug/ trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Debug/TempPE/ trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Debug/build.force trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/MySimon.csproj.FileList.txt trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Release/ trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Release/MySimon.dll trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Release/MySimon.pdb trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Release/ResolveAssemblyReference.cache trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Release/TempPE/ trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/SimonSay.csproj.FileList.txt trunk/plugins/MySimon/Source/SimonSay/SimonSay.sln trunk/plugins/MySimon/Source/SimonSay/SimonSay.suo trunk/plugins/MySimon/readme.txt Added: trunk/plugins/MySimon/Release/Plugins/Windows/MySimon.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Release/Plugins/Windows/MySimon.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Release/Skin/Media/MySimon_1.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Release/Skin/Media/MySimon_1.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Release/Skin/Media/MySimon_1a.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Release/Skin/Media/MySimon_1a.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Release/Skin/Media/MySimon_2.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Release/Skin/Media/MySimon_2.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Release/Skin/Media/MySimon_2a.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Release/Skin/Media/MySimon_2a.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Release/Skin/Media/MySimon_3.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Release/Skin/Media/MySimon_3.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Release/Skin/Media/MySimon_3a.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Release/Skin/Media/MySimon_3a.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Release/Skin/Media/MySimon_4.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Release/Skin/Media/MySimon_4.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Release/Skin/Media/MySimon_4a.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Release/Skin/Media/MySimon_4a.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Release/Skin/MySimon.xml =================================================================== --- trunk/plugins/MySimon/Release/Skin/MySimon.xml (rev 0) +++ trunk/plugins/MySimon/Release/Skin/MySimon.xml 2007-03-07 20:28:56 UTC (rev 164) @@ -0,0 +1,136 @@ +<window> + <id>0709</id> + <defaultcontrol>2</defaultcontrol> + <allowoverlay>yes</allowoverlay> + <autohidetopbar>yes</autohidetopbar> + <controls> + <control> + <description>BackGround</description> + <type>image</type> + <id>1</id> + <posX>0</posX> + <posY>0</posY> + <width>720</width> + <height>576</height> + <texture>background.png</texture> + </control> + <control> + <description>an Image</description> + <type>image</type> + <id>11</id> + <posX>75</posX> + <posY>370</posY> + <texture>hover_my videos.png</texture> + </control> + <control> + <description>text label</description> + <type>label</type> + <id>1</id> + <posX>60</posX> + <posY>70</posY> + <label>Simon Say</label> + <font>font16</font> + <align>Left</align> + <textcolor>ffffffff</textcolor> + </control> + <control> + <description>Start</description> + <type>button</type> + <id>2</id> + <posX>60</posX> + <posY>97</posY> + <label>Start</label> + <onleft>2</onleft> + <onright>2</onright> + <onup>6</onup> + <ondown>3</ondown> + </control> + <control> + <description>Level</description> + <type>button</type> + <id>3</id> + <posX>60</posX> + <posY>131</posY> + <label>Level: Amateur</label> + <onleft>3</onleft> + <onright>3</onright> + <onup>2</onup> + <ondown>6</ondown> + </control> + <control> + <description>text label</description> + <type>label</type> + <id>4</id> + <posX>70</posX> + <posY>170</posY> + <label>#Round</label> + <font>font12</font> + <align>Left</align> + <textcolor>ffffffff</textcolor> + </control> + <control> + <description>text label</description> + <type>label</type> + <id>4</id> + <posX>70</posX> + <posY>204</posY> + <label>#Player</label> + <font>font12</font> + <align>Left</align> + <textcolor>ffffffff</textcolor> + </control> + <control> + <description>Whatsthis</description> + <type>button</type> + <id>6</id> + <posX>60</posX> + <posY>233</posY> + <label>What's this?</label> + <onleft>6</onleft> + <onright>6</onright> + <onup>3</onup> + <ondown>2</ondown> + </control> + <control> + <type>button</type> + <id>101</id> + <posX>280</posX> + <posY>80</posY> + <width>150</width> + <height>150</height> + <textureFocus>#Senso1</textureFocus> + <textureNoFocus>#Senso1</textureNoFocus> + </control> + <control> + <type>button</type> + <id>102</id> + <posX>429</posX> + <posY>80</posY> + <width>150</width> + <height>150</height> + <textureFocus>#Senso2</textureFocus> + <textureNoFocus>#Senso2</textureNoFocus> + </control> + <control> + <type>button</type> + <id>103</id> + <posX>280</posX> + <posY>229</posY> + <width>150</width> + <height>150</height> + <textureFocus>#Senso3</textureFocus> + <textureNoFocus>#Senso3</textureNoFocus> + </control> + <control> + <type>button</type> + <id>104</id> + <posX>429</posX> + <posY>229</posY> + <width>150</width> + <height>150</height> + <textureFocus>#Senso4</textureFocus> + <textureNoFocus>#Senso4</textureNoFocus> + </control> + + </controls> +</window> Added: trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_a.wav =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_a.wav ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_c.wav =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_c.wav ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_e.wav =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_e.wav ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_err.wav =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_err.wav ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_g.wav =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Release/Skin/Sounds/MySimon_g.wav ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/MySimon.cs =================================================================== --- trunk/plugins/MySimon/Source/SimonSay/SimonSay/MySimon.cs (rev 0) +++ trunk/plugins/MySimon/Source/SimonSay/SimonSay/MySimon.cs 2007-03-07 20:28:56 UTC (rev 164) @@ -0,0 +1,512 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 Team MediaPortal + * http://www.team-mediaportal.com + * + * 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, 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 GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows.Forms; +using MediaPortal.GUI.Library; +using MediaPortal.Dialogs; +using MediaPortal.Util; +using MediaPortal.Utils; + +namespace MediaPortal.GUI.MySimon +{ + public class MySimonGUI : GUIWindow , ISetupForm + { + #region SkinControl + [SkinControlAttribute(2)] protected GUIButtonControl BtnStart = null; + [SkinControlAttribute(3)] protected GUIButtonControl BtnLevel = null; + + [SkinControlAttribute(6)] protected GUIButtonControl BtnWhatsThis = null; + + [SkinControlAttribute(101)] protected GUIButtonControl BtnRed = null; + [SkinControlAttribute(102)] protected GUIButtonControl BtnBlue = null; + [SkinControlAttribute(103)] protected GUIButtonControl BtnGreen = null; + [SkinControlAttribute(104)] protected GUIButtonControl BtnYellow = null; + #endregion + + #region Private variables + string Level="Am"; //Choosen level + + Boolean SimonOn = false; + Boolean PlayerOn = false; + + int[] Code = new int[100]; + + int timeBase = 0; + int timeActual = 0; + int timeWait = 0; + + int round = 0; + int cnt = 0; + + private static OnActionHandler ah; + + private System.Windows.Forms.Timer _Game = new System.Windows.Forms.Timer(); + #endregion + + #region ISetupForm Members + + // Returns the name of the plugin which is shown in the plugin menu + public string PluginName() + { + return "My Simon Say"; + } + + // Returns the description of the plugin is shown in the plugin menu + public string Description() + { + return "Simon Say"; + } + + // Returns the author of the plugin which is shown in the plugin menu + public string Author() + { + return "Mark Koenig (kroko)"; + } + + // show the setup dialog + public void ShowPlugin() + { + MessageBox.Show("Nothing to configure, this is just an example"); + } + + // Indicates whether plugin can be enabled/disabled + public bool CanEnable() + { + return true; + } + + // get ID of windowplugin belonging to this setup + public int GetWindowId() + { + return 0709; + } + + // Indicates if plugin is enabled by default; + public bool DefaultEnabled() + { + return true; + } + + // indicates if a plugin has its own setup screen + public bool HasSetup() + { + return false; + } + + /// <summary> + /// If the plugin should have its own button on the main menu of MediaPortal then it + /// should return true to this method, otherwise if it should not be on home + /// it should return false + /// </summary> + /// <param name="strButtonText">text the button should have</param> + /// <param name="strButtonImage">image for the button, or empty for default</param> + /// <param name="strButtonImageFocus">image for the button, or empty for default</param> + /// <param name="strPictureImage">subpicture for the button or empty for none</param> + /// <returns>true : plugin needs its own button on home + /// false : plugin does not need its own button on home</returns> + + public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) + { + strButtonText = PluginName(); + strButtonImage = String.Empty; + strButtonImageFocus = String.Empty; + strPictureImage = String.Empty; + return true; + } + + #endregion + + public override int GetID + { + get + { + return 0709; + } + set + { + base.GetID = value; + } + } + + public override bool Init() + { + bool result = Load(GUIGraphicsContext.Skin + @"\MySimon.xml"); + if (ah == null) ah = new OnActionHandler(OnAction2); + return result; + } + + #region Actions + public override void OnAction(Action action) + { + base.OnAction(action); + } + public void OnAction2(Action action) + { + + if (GUIWindowManager.ActiveWindowEx == (int)GUIWindow.Window.WINDOW_DIALOG_MENU) return; + + //string t = action.wID.ToString(); + //GUIPropertyManager.SetProperty("#Round", t); + + if (PlayerOn) + { + switch (action.wID) + { + //normal + case Action.ActionType.ACTION_REMOTE_RED_BUTTON: + Check(0); + break; + case Action.ActionType.ACTION_REMOTE_BLUE_BUTTON: + Check(1); + break; + case Action.ActionType.ACTION_REMOTE_GREEN_BUTTON: + Check(2); + break; + case Action.ActionType.ACTION_REMOTE_YELLOW_BUTTON: + Check(3); + break; + //my PC + case Action.ActionType.ACTION_SHOW_GUI: + Check(0); + break; + case Action.ActionType.ACTION_ASPECT_RATIO: + Check(1); + break; + case Action.ActionType.ACTION_NEXT_AUDIO: + Check(2); + break; + case Action.ActionType.ACTION_SHOW_INFO: + Check(3); + break; + // play with 1 2 + // play with 4 5 + case Action.ActionType.ACTION_KEY_PRESSED: + switch (action.m_key.KeyChar) + { + case '1': + Check(0); + break; + case '2': + Check(1); + break; + case '4': + Check(2); + break; + case '5': + Check(3); + break; + } + break; + default: + break; + } + } + } + #endregion + + public override bool OnMessage(GUIMessage message) + { + return base.OnMessage(message); + } + + public void Dispose() + { + _Game.Stop(); + _Game.Tick -= new EventHandler(_Game_Tick); + } + + protected override void OnPageLoad() + { + _Game.Interval = 5; + _Game.Tick += new EventHandler(_Game_Tick); + _Game.Start(); + + SimonOn = false; + PlayerOn = false; + Level = "Am"; + + GUIGraphicsContext.OnNewAction -= ah; + GUIGraphicsContext.OnNewAction += ah; + + base.OnPageLoad(); + + Reset(); + + GUIPropertyManager.SetProperty("#Round", "Round: 1"); + GUIPropertyManager.SetProperty("#Player", "GAME OVER"); + } + + protected override void OnPageDestroy(int new_windowId) + { + _Game.Stop(); + _Game.Tick -= new EventHandler(_Game_Tick); + } + + protected override void OnClicked(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType) + { + if (control == BtnLevel) + OnBtnLevel(); + if (control == BtnWhatsThis) + OnBtnWhatsThis(); + if (control == BtnStart) + { //start game + if ((!PlayerOn) && (!SimonOn)) + { + Random randObj = new Random(); + for (int i = 0; i <= 99; i++) + { // do random colors for 100 rounds + Code[i] = (int)(randObj.NextDouble() * 4); + } + // set timebase for game + if (Level == "Pro") + timeBase = 4; + if (Level == "Nor") + timeBase = 10; + if (Level == "Am") + timeBase = 20; + + timeActual = timeBase; + Reset(); + + //init round + round = 0; + cnt = 0; + //simonn starts + SimonOn = true; + } + } + if (PlayerOn) + { + if ((controlId >= 101) && (controlId <= 104)) + { //which button has clicked ? + if (controlId == 101) Check(0); + if (controlId == 102) Check(1); + if (controlId == 103) Check(2); + if (controlId == 104) Check(3); + } + } + base.OnClicked(controlId, control, actionType); + } + + protected override void OnShowContextMenu() + { + base.OnShowContextMenu(); + } + + private void OnBtnLevel() + { //Choose level for the game + if ((!PlayerOn) && (!SimonOn)) + { + if (Level == "Nor") + { + GUIControl.SetControlLabel(GetID, BtnLevel.GetID, "Level: Professional"); + Level = "Pro"; + } + else if (Level == "Pro") + { + GUIControl.SetControlLabel(GetID, BtnLevel.GetID, "Level: Amateur"); + Level = "Am"; + } + else + { + GUIControl.SetControlLabel(GetID, BtnLevel.GetID, "Level: Normal"); + Level = "Nor"; + } + } + } + + private void OnBtnWhatsThis() + { + GUIDialogText dlg = (GUIDialogText)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_TEXT); + dlg.SetHeading("What's Simon Say (Senso)"); + dlg.SetText("Simon Say is a game where your object is to repeat a code of\n" + + "tones and colors.\n" + + "Level Amateur/Normal/Professional: Speed is increasing\n\n" + + "I would like to say 'Thank You' to MB for their great games.\n" + + "In my earlier day's I had a lot of them. We had a lot of fun\n" + + "playing them.\n\n" + + "Good luck\nkroko"); + dlg.DoModal(GetID); + } + + private void Red() + { // draw red field on + GUIPropertyManager.SetProperty("#Senso1", "MySimon_1a.png"); + MediaPortal.Util.Utils.PlaySound ("MySimon_c.wav", false, true); + } + private void Blue() + { // draw blue field on + GUIPropertyManager.SetProperty("#Senso2", "MySimon_2a.png"); + MediaPortal.Util.Utils.PlaySound("MySimon_e.wav", false, true); + } + private void Green() + { // draw green field on + GUIPropertyManager.SetProperty("#Senso3", "MySimon_3a.png"); + MediaPortal.Util.Utils.PlaySound("MySimon_g.wav", false, true); + } + private void Yellow() + { // draw yellow field on + GUIPropertyManager.SetProperty("#Senso4", "MySimon_4a.png"); + MediaPortal.Util.Utils.PlaySound("MySimon_a.wav", false, true); + } + private void Error(int errNo) + { // draw correct field on + Reset(); + if (errNo== 0) + GUIPropertyManager.SetProperty("#Senso1", "MySimon_1a.png"); + if (errNo == 1) + GUIPropertyManager.SetProperty("#Senso2", "MySimon_2a.png"); + if (errNo == 2) + GUIPropertyManager.SetProperty("#Senso3", "MySimon_3a.png"); + if (errNo == 3) + GUIPropertyManager.SetProperty("#Senso4", "MySimon_4a.png"); + + MediaPortal.Util.Utils.PlaySound("MySimon_err.wav", false, true); + } + private void Reset() + { // draw all fields off + GUIPropertyManager.SetProperty("#Senso1", "MySimon_1.png"); + GUIPropertyManager.SetProperty("#Senso2", "MySimon_2.png"); + GUIPropertyManager.SetProperty("#Senso3", "MySimon_3.png"); + GUIPropertyManager.SetProperty("#Senso4", "MySimon_4.png"); + } + + private void Check(int Button) + { + Reset(); // reset display + timeActual = timeBase; // set time to base + + if (Button == 0) + { //red is pressed + Red(); + } + if (Button == 1) + { //blue is pressed + Blue(); + } + if (Button == 2) + { //green is pressed + Green(); + } + if (Button == 3) + { //yellow is pressed + Yellow(); + } + if (Code[cnt] != Button ) + { //wrong color is pressed + PlayerOn = false; + Error(Code[cnt]); + } + else + { // color is correct + cnt++; // next tone + timeActual = 30; // check time for player + if (cnt > round) // last tone reached ? + { + PlayerOn = false; // Simon is now on + SimonOn = true; + + cnt = 0; // Start with tone 0 + round++; // next Round + + if (timeBase >4) // increased difficulty + timeBase--; + + timeWait = 30; // wait a little + timeActual = timeBase; // reset timer + } + } + } + + void _Game_Tick(object sender, EventArgs e) + { //display status of the game + if ((!PlayerOn) && (!SimonOn)) + GUIPropertyManager.SetProperty("#Player", "GAME OVER"); + if (PlayerOn) + GUIPropertyManager.SetProperty("#Player", "PLAYER"); + if (SimonOn) + GUIPropertyManager.SetProperty("#Player", "SIMON"); + //Simon is on and no wait + if ((SimonOn) && (timeWait==0)) + { // just started ? + if (timeBase == timeActual) + { //Display color + if (Code[cnt] == 0) + Red(); + if (Code[cnt] == 1) + Blue(); + if (Code[cnt] == 2) + Green(); + if (Code[cnt] == 3) + Yellow(); + + //Display round + int tmp = round + 1; + GUIPropertyManager.SetProperty("#Round", "Round: " + tmp.ToString() + " "); + } //count timer down + if (timeActual > 0) + timeActual = timeActual - 1; + else + { //if timer is 0 + timeActual = timeBase; + Reset(); + //next tone + if (cnt < round) + cnt++; + else + { //player is next + SimonOn = false; + PlayerOn = true; + // first tone a lot of time + timeActual = 50; + cnt = 0; + } + } + } + + if (timeWait > 0) + { //wait timer for little break + timeWait = timeWait - 1; + if (timeWait==timeBase) + Reset(); + } + + if (PlayerOn) + { // if player is on count down timer + if (timeActual > 0) + timeActual = timeActual - 1; + else + { //Player wait too long + PlayerOn = false; + Error(Code[cnt]); + //Reset(); + } + } + } + } +} Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/MySimon.csproj =================================================================== --- trunk/plugins/MySimon/Source/SimonSay/SimonSay/MySimon.csproj (rev 0) +++ trunk/plugins/MySimon/Source/SimonSay/SimonSay/MySimon.csproj 2007-03-07 20:28:56 UTC (rev 164) @@ -0,0 +1,51 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{206A81B8-D452-45C2-86C9-CBBECF31C11C}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>ClassLibrary1</RootNamespace> + <AssemblyName>MySimon</AssemblyName> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="Core, Version=1.0.2593.1921, Culture=neutral, processorArchitecture=MSIL" /> + <Reference Include="Dialogs, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL" /> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + <Reference Include="Utils, Version=1.0.2593.1896, Culture=neutral, processorArchitecture=MSIL" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="MySimon.cs" /> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MySimon/Source/SimonSay/SimonSay/Properties/AssemblyInfo.cs (rev 0) +++ trunk/plugins/MySimon/Source/SimonSay/SimonSay/Properties/AssemblyInfo.cs 2007-03-07 20:28:56 UTC (rev 164) @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Allgemeine Informationen über eine Assembly werden über die folgenden +// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +// die mit einer Assembly verknüpft sind. +[assembly: AssemblyTitle("MySimonSay")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MySimonSay")] +[assembly: AssemblyCopyright("Copyright © 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar +// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von +// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest. +[assembly: ComVisible(false)] + +// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird +[assembly: Guid("1bd4081e-182e-436a-ab7a-abcc7b53684b")] + +// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +// +// Hauptversion +// Nebenversion +// Buildnummer +// Revision +// +// Sie können alle Werte angeben oder die standardmäßigen Revisions- und Buildnummern +// übernehmen, indem Sie "*" eingeben: +[assembly: AssemblyVersion("0.1.0.0")] +[assembly: AssemblyFileVersion("0.1.0.0")] Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/Core.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/Core.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/Dialogs.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/Dialogs.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/MySimon.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/MySimon.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/MySimon.pdb =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/MySimon.pdb ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/Utils.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/Utils.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/copy.bat =================================================================== --- trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/copy.bat (rev 0) +++ trunk/plugins/MySimon/Source/SimonSay/SimonSay/bin/Release/copy.bat 2007-03-07 20:28:56 UTC (rev 164) @@ -0,0 +1,3 @@ +copy MySimon.dll "C:\Programme\Team MediaPortal\MediaPortal\Plugins\Windows" + + Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Debug/build.force =================================================================== Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/MySimon.csproj.FileList.txt =================================================================== --- trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/MySimon.csproj.FileList.txt (rev 0) +++ trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/MySimon.csproj.FileList.txt 2007-03-07 20:28:56 UTC (rev 164) @@ -0,0 +1,6 @@ +obj\Release\ResolveAssemblyReference.cache +bin\Release\MySimon.dll +bin\Release\MySimon.pdb +obj\Release\MySimon.dll +obj\Release\MySimon.pdb +obj\Debug\ResolveAssemblyReference.cache Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Release/MySimon.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Release/MySimon.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Release/MySimon.pdb =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Release/MySimon.pdb ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Release/ResolveAssemblyReference.cache =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/Release/ResolveAssemblyReference.cache ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/SimonSay.csproj.FileList.txt =================================================================== --- trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/SimonSay.csproj.FileList.txt (rev 0) +++ trunk/plugins/MySimon/Source/SimonSay/SimonSay/obj/SimonSay.csproj.FileList.txt 2007-03-07 20:28:56 UTC (rev 164) @@ -0,0 +1,5 @@ +obj\Release\ResolveAssemblyReference.cache +bin\Release\SimonSay.dll +bin\Release\SimonSay.pdb +obj\Release\SimonSay.dll +obj\Release\SimonSay.pdb Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay.sln =================================================================== --- trunk/plugins/MySimon/Source/SimonSay/SimonSay.sln (rev 0) +++ trunk/plugins/MySimon/Source/SimonSay/SimonSay.sln 2007-03-07 20:28:56 UTC (rev 164) @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MySimon", "SimonSay\MySimon.csproj", "{206A81B8-D452-45C2-86C9-CBBECF31C11C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {206A81B8-D452-45C2-86C9-CBBECF31C11C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {206A81B8-D452-45C2-86C9-CBBECF31C11C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {206A81B8-D452-45C2-86C9-CBBECF31C11C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {206A81B8-D452-45C2-86C9-CBBECF31C11C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Added: trunk/plugins/MySimon/Source/SimonSay/SimonSay.suo =================================================================== (Binary files differ) Property changes on: trunk/plugins/MySimon/Source/SimonSay/SimonSay.suo ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MySimon/readme.txt =================================================================== --- trunk/plugins/MySimon/readme.txt (rev 0) +++ trunk/plugins/MySimon/readme.txt 2007-03-07 20:28:56 UTC (rev 164) @@ -0,0 +1,22 @@ +Simon Say V0.1 +-------------- + +Simon Say (Senso) + +Initial release +This nice game from MB as a MP version. You can play with + +- the mouse +- remote color buttons +- 1 2 + 4 5 (action keys) + +Copy the plugin and skin files into your favorite skin folder. +I had to adjust my remote a little in the setup. It was to sensitve. + +Planed feature: Highscores ? + +Have fun. + +Greets +kroko \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |