Icontem

File: example_game_movement.htm

Recommend this page to a friend!
  Classes of JImmy Bo  >  Spritesheet Animation Manager  >  example_game_movement.htm  >  Download  
File: example_game_movement.htm
Role: Example script
Content type: text/plain
Description: example game movement
Class: Spritesheet Animation Manager
Animate graphics using CSS sprites
Author: By
Last change: Example game movement usage
Date: 5 years ago
Size: 1,338 bytes
 

Contents

Class file image Download
<!DOCTYPE HTML>
<html>
	<head>
		<title>Javascript Spritesheet Animation Manager :: Example Player Walk</title>
		
		<!-- some jQuery -->
		<script src="https://code.jquery.com/jquery-2.1.0.min.js" language="Javascript"></script>
		
		<!-- load our class -->
		<script src='class.spritesheet_animation_manager.js'></script>
		
		<style>
			
			/*	
			// attach spritesheet to whatever you want the spriteset to be attached.
			// so even though we may be controlling different elements, they can share the
			// spriteset...
			*/		
	
			.spritesheet.bard {

				background:url('_siteimg/erbarlow/bard.png'); /* check out http://opengameart.org/content/more-nes-style-rpg-characters for allowed usage */
				background-position:0px 0px; 
				overflow:hidden;
				margin:0px;
				padding:0px;

			}
			
			
			.info {
				position:fixed;
				width:200px;
				height:50px;
				font-family:arial;
				color:black;
				background-color:#ccc;
				right:10px;
				top:10px;
				padding:10px;
				
			}
			
		</style>
	</head>


	<body>
		<div class='spritesheet bard player'></div>
	


		<!-- how about some info... -->
		<div class='info'>Hit w,a,s,d on your keyboard...</div>

		
		<!-- load our example -->
		<script src='example_game_movement.js'></script>
		
		
	</body>
</html>