Unity Grey Box
This is very hard. Im not joking. Try Run. Trying to make the character move and camera follow.
Sprite Sheet.
HAHAHA. LAWAK HAMBAR ! Running Falling COMING SOON Jumping COMING SOON
C# Codes
- using UnityEngine;
using System.Collections;
public class CharacterMovement : MonoBehaviour {
public float maxSpeed = 6.0f;
public bool facingRight = true;
public float moveDirection;
public float jumpSpeed = 600.0f;
//Check Ground
public bool grounded = false;
public Transform groundCheck;
public float groundRadius = 2.0f;
public LayerMask whatIsGround;
void Awake()
{
groundCheck = GameObject.Find ("GroundCheck").transform;
}
// Use this for initialization
void FixedUpdate () {
grounded = Physics2D.OverlapCircle (groundCheck.position, groundRadius, whatIsGround);
GetComponent<Rigidbody> ().velocity = new Vector2 (moveDirection * maxSpeed, GetComponent<Rigidbody> ().velocity.y);
if (moveDirection > 0.0f && !facingRight) {
Flip ();
} else if (moveDirection < 0.0f && facingRight) {
Flip ();
}
}
void Flip(){
facingRight = !facingRight;
transform.Rotate (Vector3.up, 180.0f, Space.World);
}
// Update is called once per frame
void Update () {
moveDirection = Input.GetAxis("Horizontal");
if (grounded && Input.GetButtonDown ("Jump")) {
GetComponent<Rigidbody> ().AddForce (new Vector2 (0, jumpSpeed));
}
}
}
For camera to follow the character movement.
- using UnityEngine;
using System.Collections;
public class CameraFollow : MonoBehaviour {
public GameObject Character;
private Vector3 offset;
// Use this for initialization
void Start () {
offset = transform.position - Character.transform.position;
}
// Update is called once per frame
void Update () {
transform.position = Character.transform.position + offset;
}
}
For Character Movement (Move left and right) - using UnityEngine; using System.Collections; public class CharacterMovement : MonoBehavi...
Game Asset
Asset
|
Function
|
Apple (Obstacles)
|
This will make the character fall down
|
Banana (Obstacles)
|
This will make the character fall down if it hits the character and it also makes the character fall if fail to jump over it.
|
Durian (Obstacles)
|
This will kill the character if it hits
|
Muddy Puddle (Obstacles)
|
This will slow the character down
|
Rock (Obstacles)
|
This will make the character fall down
|
Tree Branches (Obstacles)
|
This will make the character fall down
|
New Shoe (Bonus Item)
|
This will increase the character’s speed for 5 seconds.
|
Cigarette (Punishment Item)
|
This will drain the character’s stamina
|
Energy Drink (Special Item)
|
This will increase the character’s stamina
|
- Running Footsteps
- Forest Ambience
- Water Shaking
- Intense Action Music
- Soft Ballad Music (towards the end)
- Water pouring
Game Asset Asset Function Apple (Obstacles) This will make the character fall down Banana (Obstacles) This will make the ...
Final Game.
Game Genre Skills; Action Educational Value In this game, players will train their hand to eye coordination skills. This will help t...
Second Game Idea
The objective of the game is to get from point A to B by tapping as fast as the player can while avoiding several obstacles such as mud, tree stump, branches.
Target Audience: Kids/Teen (Age 12-16)
Inspiration and concept:
So my alternative idea for my game is also based on a project I did last semester. The title is Hope. The story is about two friends racing ...








































