{"id":16687248,"url":"https://github.com/redth/eggstogo","last_synced_at":"2025-04-10T00:21:20.729Z","repository":{"id":9831192,"uuid":"11819085","full_name":"Redth/EggsToGo","owner":"Redth","description":"Xamarin Cross Platform mobile library for implementing Easter Eggs!","archived":false,"fork":false,"pushed_at":"2017-10-13T18:39:04.000Z","size":859,"stargazers_count":13,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T22:41:46.976Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Redth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-01T14:29:47.000Z","updated_at":"2022-07-24T18:49:32.000Z","dependencies_parsed_at":"2022-09-01T10:02:27.703Z","dependency_job_id":null,"html_url":"https://github.com/Redth/EggsToGo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Redth%2FEggsToGo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Redth%2FEggsToGo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Redth%2FEggsToGo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Redth%2FEggsToGo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Redth","download_url":"https://codeload.github.com/Redth/EggsToGo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248132117,"owners_count":21052976,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T15:08:24.367Z","updated_at":"2025-04-10T00:21:20.700Z","avatar_url":"https://github.com/Redth.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"Eggs-To-Go\n==========\n\nEggs-To-Go is a Xamarin Cross Platform mobile library for implementing Easter Egg gestures!\n\nFeatures\n--------\n - Konami and Mortal Kombat code\n - Create your own Custom sequences\n - Xamarin.iOS and Xamarin.Android support\n - Xamarin Component store\n \n\n\nGetting Started - Xamarin.iOS\n-----------------------------\nYou can use the following code with any UIView you would like to recognize eggs/codes on (for example in a View Controller).  It will attach gesture listeners to the view you specify in the actor:\n\n```csharp\n//Create our new instance, specifying the UIView to recognize gestures on\nvar easter = new EggsToGo.Easter (this.View, new KonamiCode());\n\n//Event for when a egg/code has been detected (eg: Konami Code)\neaster.EggDetected += egg =\u003e Console.WriteLine(\"Egg: \" + egg.Name);\n\n//You can see each individual command as it happens too\neaster.CommandDetected += cmd =\u003e Console.WriteLine(\"Command: \" + cmd.Value);\n```\n\n\n \nGetting Started - Xamarin.Android\n---------------------------------\nAndroid is a bit trickier than iOS, simply because recognizing gestures requires a MotionEvent of some sort.  Typically you would override the OnTouchEvent in an activity and pass that along to the Easter instance.  The Easter instance doesn't care where this information comes from, but it needs it in order to recognize gestures.\n\nYou can use the following code in the Activity you would like to support the gesture detection:\n\n```csharp\npublic class MainActivity : Activity\n{\n\tEggsToGo.Easter easter;\n\t\n    protected override OnCreate(Bundle bundle)\n    {\n        base.OnCreate (bundle);\n        \n        SetContentView(Resource.Layout.Main);\n        \n        easter = new EggsToGo.Easter (new KonamiCode());\n        \n        //Event for when a egg/code has been detected (eg: Konami Code)\n        easter.EggDetected += egg =\u003e\n            Toast.MakeText(this, egg.Name, ToastLength.Short).Show();\n            \n        //You can see each individual command as it happens too\n        easter.CommandDetected += cmd =\u003e\n            Android.Util.Log.Debug(\"EggsToGo\", \"Commadn: \" + cmd.Value);\n    }\n    \n    public override bool OnTouchEvent(MotionEvent e)\n    {\n    \t//IMPORTANT: You must pass this event on to the Easter class\n        easter.OnTouchEvent(e);\n        \n        return base.OnTouchEvent(e);\n    }\n}\n```\n\n\nDefault Egg Sequences\n---------------------\nBy default I've included the Konami code and Mortal Kombat code:\n\n- **Konami Code:** UP, UP, DOWN, DOWN, LEFT, RIGHT, LEFT, RIGHT, TAP, TAP\n- **Mortal Kombat Code:** DOWN, UP, DOWN, DOWN, LEFT, RIGHT, LEFT, RIGHT, TAP, TAP\n\n\nCustom Egg Sequences\n--------------------\nBy default the Konami and Mortal Kombat codes are built in, but you may want to add your own sequences!\n\n```csharp\nvar easyEgg = new CustomEgg(\"Easy\")\n    .WatchForSequence(Command.SwipeUp(), Command.SwipeDown(), Command.Tap());\n    \nvar easter = new Easter(this.View, easyEgg);\n```\n\n\nThanks\n------\nThanks to Eight-Bot software for their original post on getting this working with Mono for Android: http://eightbot.com/writeline/developer/konami-code-detection-with-mono-for-android/\n\nThis was definitely my inspiration for making this simple component!\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredth%2Feggstogo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredth%2Feggstogo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredth%2Feggstogo/lists"}