Skip to content
Snippets Groups Projects

Feature physics

Merged Clinton Galbraith requested to merge feature_physics into develop
3 files
+ 52
25
Compare changes
  • Side-by-side
  • Inline
Files
3
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class InputManagerScript : MonoBehaviour {
[SerializeField]
@@ -10,16 +10,20 @@ public class InputManagerScript : MonoBehaviour {
private GameObject playerTwo;
private PlayerBehavior playerOneBehavior;
private PlayerBehavior playerTwoBehavior;
// Use this for initialization
private PlayerBehavior playerTwoBehavior;
// Use this for initialization
void Start () {
playerOneBehavior = playerOne.GetComponent<PlayerBehavior>();
playerTwoBehavior = playerTwo.GetComponent<PlayerBehavior>();
}
// Update is called once per frame
}
// Update is called once per frame
void Update () {
/**
* Player One Movement Controls
*/
if (Input.GetKey(KeyCode.W))
{
playerOneBehavior.MoveUp();
@@ -43,6 +47,9 @@ public class InputManagerScript : MonoBehaviour {
}
/**
* Player Two Movement Controls
*/
if (Input.GetKey(KeyCode.UpArrow))
{
playerTwoBehavior.MoveUp();
@@ -63,5 +70,5 @@ public class InputManagerScript : MonoBehaviour {
{
playerTwoBehavior.Brake();
}
}
}
}
}
Loading