Skip to content

PacktPublishing/Unity-2D-Game-Development-Cookbook

Repository files navigation

#Unity 2D Game Development Cookbook

This is the code repository for Unity 2D Game Development Cookbook, published by Packt. It contains all the supporting project files necessary to work through the book from start to finish.

##Instructions and Navigation All of the code is organized into folders. Each folder starts with Chapter followed by Chapter Number. For example, Chapter1. Packages have been made with Unity Pro 3.4.3. Recommended Unity version for book: 3.3 and up. XNView available at: http://www.xnview.com/. Maya version used: Maya 2014. Photoshop version used: CS6. Each Chapter contains code files. You will see code something similler to the following:

using UnityEngine;
using System.Collections;

public class ActorControls : MonoBehaviour {

	public float jumpHeight;
	public GameObject ps;


	// Use this for initialization
	void Start () {

		if(jumpHeight == 0)
			jumpHeight = 3.0f;
	
	}
	
	// Update is called once per frame
	void Update () {

		if( Input.GetKeyDown(KeyCode.UpArrow)){
			rigidbody.velocity += Vector3.up * jumpHeight;
		}
	
	}

	void OnCollisionEnter(Collision c){
		if(c.gameObject.tag == "coll"){
			Instantiate (ps,c.transform.position,Quaternion.identity);
			GameObject.Destroy(c.gameObject);
		}
	}
}

##Related Entity Framework Products:

About

Code repository for Unity 2D Game Development Cookbook, published by Packt Publishing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages