Skip to content
This repository has been archived by the owner on Nov 12, 2019. It is now read-only.

Commit

Permalink
Initial commit of Maze Game tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
scott.mather committed Feb 19, 2014
1 parent ce7a299 commit 46f066c
Show file tree
Hide file tree
Showing 82 changed files with 728 additions and 0 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Maze Game Finished UnityProject/Maze Game/Assets/Scenes.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Maze Game Finished UnityProject/Maze Game/Assets/Scripts.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

@@ -0,0 +1,42 @@
using UnityEngine;
using System.Collections;

public class MovementScript : MonoBehaviour {

public float speed = 4;

private Vector2 movement;
private Animator animator;

void Start()
{
animator = GetComponent<Animator>();
}

void Update()
{
float inputX = Mathf.Round(Input.GetAxis("Horizontal"));
float inputY = Mathf.Round(Input.GetAxis("Vertical"));

if(inputY == 0 && inputX == 0)
{
animator.SetBool("Idle",true);
}
else
{
animator.SetBool("Idle",false);
}

movement = new Vector2(
speed * inputX,
speed * inputY);

}

void FixedUpdate()
{
rigidbody2D.velocity = movement;
animator.SetFloat("Horizontal",movement.x);
animator.SetFloat("Vertical",movement.y);
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Maze Game Finished UnityProject/Maze Game/Assets/Sprites.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 46f066c

Please sign in to comment.