Click here to Skip to main content
15,881,715 members
Articles / Web Development / HTML

Recreating Frogger in Silverlight

Rate me:
Please Sign up or sign in to vote.
4.91/5 (81 votes)
11 May 2009CPOL10 min read 125K   1.1K   116  
A tutorial on how to recreate a classic arcade game in Silverlight.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Frogger {
	public partial class Home : SpriteBase {		
		public Home() {
			InitializeComponent();
			this._actualHeight = 65;
			this._actualWidth = 60;
		}

		private bool _vacant = true;
		public bool Vacant {
			get {
				return _vacant;
			}
			set {
				_vacant = value;
				if (value == false)
					image.Opacity = 100;
				else
					image.Opacity = 0;
			}
		}
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Concepts2Code
United States United States
Michael is the co-founder and master consultant for Concepts2Code, a software consulting company based in Buffalo, New York. He's been programming since the early 1990's. His vast programming experience includes VB, Delphi, C#, ASP, ASP.NET, Ruby on Rails, Coldfusion and PHP. Michael also is a Microsoft Certified Application Developer and a Certified Technology Specialist for SQL Server.

Visit his blog.

Comments and Discussions