Making A Walk Through Game

Today with Ant we continued to make our Walk through game.

We added a new feature which was the FlashLight, but because we’re English we’re gonna call it a Torch.

The code for this was :

using UnityEngine;
using System.Collections;

public class FlashLight : MonoBehaviour {

public Light flashlight;

void Update () {
if (Input.GetKeyDown (KeyCode.F)) {
flashlight.intensity = 1 – flashlight.intensity;

This meant that when you press the “F” key the light intensity = 1 which is the intensity of the spotlight which we added previously.

We also added some more code to the door to give it a better animation when opening.

The code was:

iTween.RotateBy(door,new Vector3(0, 0.25f, 0), 5);

This the Torch in action:Flashlight.png

I also created a few models in Maya. The models are not great, but i just wanted to test them out. They have not been textured very well either, i don’t really know how to Uv unwrap yet.

Firstly is the Fridge. I modeled the base and the door separately so that i can eventually animate the door to open.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s