void Update () {
UpdateCamera ();
theSpriteScale = transform.localScale;
if (Input.GetKeyDown(KeyCode.LeftArrow)|| Input.GetKeyDown(KeyCode.A))
{
spriteFaceRight = false;
spriteFaceLeft = true;
}
if (Input.GetKeyDown(KeyCode.RightArrow)||Input.GetKeyDown(KeyCode.D))
{
spriteFaceLeft = false;
spriteFaceRight = true;
}
if (spriteFLeftLock)
{
spriteFaceLeft = false;
print("leftLock");
}
if (spriteFRightLock)
{
spriteFaceRight = false;
print ("rightLock");
}
if (spriteFaceLeft)
{
theSpriteScale.x *= -1;
transform.localScale = theSpriteScale;
spriteFLeftLock = true;
spriteFRightLock = false;
spriteFaceLeft = false;
print ("spriteFaceLeft");
}
if (spriteFaceRight)
{
theSpriteScale.x *= -1;
transform.localScale = theSpriteScale;
spriteFRightLock = true;
spriteFLeftLock = false;
spriteFaceRight = false;
print("spriteFaceRight");
}
if ((Character_Controller.collisionFlags & CollisionFlags.Sides) == 0)
{
isClimb = false;
}
if (cactusPower == true) {
if ((Character_Controller.collisionFlags & CollisionFlags.Sides) != 0)
{
isClimb = true;
}
if (isClimb == true) {
if (Input.GetKey(KeyCode.LeftArrow)|| Input.GetKeyDown(KeyCode.A))
{
faceRight = false;
faceLeft = true;
}
if (Input.GetKey(KeyCode.RightArrow)|| Input.GetKeyDown(KeyCode.D))
{
faceLeft = false;
faceRight = true;
}
gravity = 0.0f;
climbDir = new Vector3 (0, Input.GetAxis ("Vertical"), 0);
climbDir = transform.TransformDirection (climbDir);
climbDir *= climbSpeed;
print ("climbing=true");
Character_Controller.Move (climbDir * Time.deltaTime);
if (Input.GetButtonDown ("Horizontal"))
{
if ((Time.time - lastTapTime) < doubleTapTime)
{
moveDirection = new Vector3 (Input.GetAxis ("Horizontal"), 0, 0);
moveDirection = transform.TransformDirection (moveDirection);
moveDirection *= Speed;
print ("doubletap");
isClimb = false;
}
lastTapTime = Time.time;
}
}
if(faceLeft == true)
{
if (Input.GetButtonDown ("Jump"))
{
climbDir = new Vector3 (1, 0, 0);
climbDir = transform.TransformDirection (climbDir);
climbDir *= jumpOffSpeed;
print ("jumpLeft");
}
}
if(faceRight ==true)
{
if (Input.GetButtonDown ("Jump"))
{
climbDir = new Vector3 (1, 0, 0);
climbDir = transform.TransformDirection (climbDir);
climbDir *= jumpOffSpeed;
print("jumpRight");
}
}
}
if (isClimb == false)
{
if (Character_Controller.isGrounded)
{
moveDirection = new Vector3(Input.GetAxis("Horizontal"),0,0);
moveDirection = transform.TransformDirection(moveDirection);
moveDirection *= Speed;
this.drift ();
if (Input.GetButton("Jump"))
{
moveDirection.y = jumpSpeed;
}
}
if (GameObject.FindWithTag("PunchHand") != null) //this will stop more punches happening
{
print("allowpunchfalse");
allowPunch = 0;
}
if (GameObject.FindWithTag("PunchHand") == null)
{
print("allowpunchtrue");
allowPunch = 1;
}
if (allowPunch == 1)
{
Rigidbody2D clone;
if (Input.GetKey(KeyCode.LeftArrow)|| Input.GetKeyDown(KeyCode.A))
{
faceRight = false;
faceLeft = true;
}
if (Input.GetKey(KeyCode.RightArrow)|| Input.GetKeyDown(KeyCode.D))
{
faceLeft = false;
faceRight = true;
}
if (faceLeft == true)
{
if (Input.GetButtonDown("Punch"))
{
print("faceLeftTrue");
clone = Instantiate(spawnSpriteLeft, transform.position, transform.rotation) as Rigidbody2D;
clone.velocity = transform.TransformDirection(Vector3.forward * 10);
/*float punchmovement = Time.deltaTime *punchprojSpeed;
transform.Translate(-punchmovement,0,0);
Destroy (spawnSpriteLeft, punchlifetime);*/
}
}
if (faceRight == true)
{
if (Input.GetButtonDown("Punch"))
{
print("faceRightTrue");
clone = Instantiate(spawnSpriteRight, transform.position, transform.rotation) as Rigidbody2D;
clone.velocity = transform.TransformDirection(Vector3.forward * 10);
/*float punchmovement = Time.deltaTime *punchprojSpeed;
transform.Translate(punchmovement,0,0);
Destroy (spawnSpriteRight, punchlifetime);*/
}
}
}
gravity = setGravity;
print("climbing=false");
moveDirection.y -= gravity * Time.deltaTime;
}
Character_Controller.Move (moveDirection * Time.deltaTime);
}
Tuesday, 26 August 2014
Monday, 25 August 2014
Sunday, 24 August 2014
Starting New Task
I will now be using this blog to document my progress with the development of Frost Fall
Tuesday, 27 May 2014
Reflection
Reflection on Game Level:
I think that I could have added more things into my 3d environment. My core design for it was the best thing in my opinion. I could have added more complex textures to my models, I did try to but when importing it was a bit buggy and I rolled with it. I think my level needed to have more of the elements that I outlined in my core design documents. The game level that I created was a basic outline that could have been expanded on.
In my animations I used no ease ins and ease outs which made a lot of them look strange. Another thing that I could have done better was my pushing animation. I animated in a way that made it look like he was just pushing a stationary object, not a heavy object. His feet also slid like he was on ice, which was not what I wanted.
In my animations I used no ease ins and ease outs which made a lot of them look strange. Another thing that I could have done better was my pushing animation. I animated in a way that made it look like he was just pushing a stationary object, not a heavy object. His feet also slid like he was on ice, which was not what I wanted.
Level Lighting
Level Effects and Lighting
The main lights that the players will notice are the lights inside the buildings and the lighting outside in the park. I decided to set my level at dusk so I set the lighting outside accordingly. Inside the buildings I wanted to make sure it was all lit for maximum visibility so I used simple, easy to tile lights that provide simple light or the whole building. In the park I didn't use any artificial light, so I just relied on the directional light that I set up for the whole level. If I wanted to make the level even scarier I could have reduced the lighting in the level to make it darker. If I used this method there would be the problem of the level not having enough light and the player would not be able to see enough. I also could have set the scene to midday and brightened the outside light to give it that impression, since this wasn't my intention when I designed the level I decided against it.
4 Animations unable to be added to show reel.
Due to some sort of bug with Adobe Premier there are 4 files that cannot be added to the show reel.
I am therefore going to be uploading them here. Sorry for any inconvenience.
I am therefore going to be uploading them here. Sorry for any inconvenience.
Death:
Pushing:
Idle On The Ground:
Walking:
Subscribe to:
Posts (Atom)


