Browse Source

Basic movement

master
NickFowler 4 years ago
parent
commit
9d35862108
6 changed files with 150 additions and 0 deletions
  1. +8
    -0
      GGJ2020/Assets/Scripts.meta
  2. +41
    -0
      GGJ2020/Assets/Scripts/PlayerController.cs
  3. +11
    -0
      GGJ2020/Assets/Scripts/PlayerController.cs.meta
  4. +45
    -0
      GGJ2020/Logs/Packages-Update.log
  5. +42
    -0
      GGJ2020/Packages/manifest.json
  6. BIN
      GGJ2020/ProjectSettings/XRSettings.asset

+ 8
- 0
GGJ2020/Assets/Scripts.meta View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 27509ad3d41769745ab66d33159d98b9
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

+ 41
- 0
GGJ2020/Assets/Scripts/PlayerController.cs View File

@ -0,0 +1,41 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerController : MonoBehaviour
{
public float walkSpeed;
private Vector2 receivedInput;
// Start is called before the first frame update
void Start()
{
}
public void SetMovement(Vector2 input)
{
receivedInput = input;
}
public void UpdatePosition()
{
float RunnerX, RunnerZ;
RunnerZ = Input.GetAxisRaw("Vertical");
RunnerX = Input.GetAxisRaw("Horizontal");
//float rotateTo = RotateRunner(RunnerX, RunnerZ);
RunnerZ = Input.GetAxis("Vertical") * Time.deltaTime * walkSpeed;
RunnerX = Input.GetAxis("Horizontal") * Time.deltaTime * walkSpeed;
transform.Translate(RunnerX, 0, RunnerZ);
}
// Update is called once per frame
void Update()
{
UpdatePosition();
}
}

+ 11
- 0
GGJ2020/Assets/Scripts/PlayerController.cs.meta View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8f7fbcfa6410c204e8977bb70e5ff84b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

+ 45
- 0
GGJ2020/Logs/Packages-Update.log View File

@ -0,0 +1,45 @@
=== Sat Feb 1 10:36:26 2020
Packages were changed.
Update Mode: resetToDefaultDependencies
The following packages were added:
com.unity.textmeshpro@2.0.1
com.unity.collab-proxy@1.2.16
com.unity.test-framework@1.1.9
com.unity.timeline@1.2.10
com.unity.ide.vscode@1.1.4
com.unity.ide.rider@1.1.4
com.unity.ugui@1.0.0
com.unity.modules.ai@1.0.0
com.unity.modules.animation@1.0.0
com.unity.modules.androidjni@1.0.0
com.unity.modules.assetbundle@1.0.0
com.unity.modules.audio@1.0.0
com.unity.modules.cloth@1.0.0
com.unity.modules.director@1.0.0
com.unity.modules.imageconversion@1.0.0
com.unity.modules.imgui@1.0.0
com.unity.modules.jsonserialize@1.0.0
com.unity.modules.particlesystem@1.0.0
com.unity.modules.physics@1.0.0
com.unity.modules.physics2d@1.0.0
com.unity.modules.screencapture@1.0.0
com.unity.modules.terrain@1.0.0
com.unity.modules.terrainphysics@1.0.0
com.unity.modules.tilemap@1.0.0
com.unity.modules.ui@1.0.0
com.unity.modules.uielements@1.0.0
com.unity.modules.umbra@1.0.0
com.unity.modules.unityanalytics@1.0.0
com.unity.modules.unitywebrequest@1.0.0
com.unity.modules.unitywebrequestassetbundle@1.0.0
com.unity.modules.unitywebrequestaudio@1.0.0
com.unity.modules.unitywebrequesttexture@1.0.0
com.unity.modules.unitywebrequestwww@1.0.0
com.unity.modules.vehicles@1.0.0
com.unity.modules.video@1.0.0
com.unity.modules.vr@1.0.0
com.unity.modules.wind@1.0.0
com.unity.modules.xr@1.0.0

+ 42
- 0
GGJ2020/Packages/manifest.json View File

@ -0,0 +1,42 @@
{
"dependencies": {
"com.unity.collab-proxy": "1.2.16",
"com.unity.ide.rider": "1.1.4",
"com.unity.ide.vscode": "1.1.4",
"com.unity.test-framework": "1.1.9",
"com.unity.textmeshpro": "2.0.1",
"com.unity.timeline": "1.2.10",
"com.unity.ugui": "1.0.0",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",
"com.unity.modules.animation": "1.0.0",
"com.unity.modules.assetbundle": "1.0.0",
"com.unity.modules.audio": "1.0.0",
"com.unity.modules.cloth": "1.0.0",
"com.unity.modules.director": "1.0.0",
"com.unity.modules.imageconversion": "1.0.0",
"com.unity.modules.imgui": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.modules.particlesystem": "1.0.0",
"com.unity.modules.physics": "1.0.0",
"com.unity.modules.physics2d": "1.0.0",
"com.unity.modules.screencapture": "1.0.0",
"com.unity.modules.terrain": "1.0.0",
"com.unity.modules.terrainphysics": "1.0.0",
"com.unity.modules.tilemap": "1.0.0",
"com.unity.modules.ui": "1.0.0",
"com.unity.modules.uielements": "1.0.0",
"com.unity.modules.umbra": "1.0.0",
"com.unity.modules.unityanalytics": "1.0.0",
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.modules.unitywebrequestassetbundle": "1.0.0",
"com.unity.modules.unitywebrequestaudio": "1.0.0",
"com.unity.modules.unitywebrequesttexture": "1.0.0",
"com.unity.modules.unitywebrequestwww": "1.0.0",
"com.unity.modules.vehicles": "1.0.0",
"com.unity.modules.video": "1.0.0",
"com.unity.modules.vr": "1.0.0",
"com.unity.modules.wind": "1.0.0",
"com.unity.modules.xr": "1.0.0"
}
}

BIN
GGJ2020/ProjectSettings/XRSettings.asset (Stored with Git LFS) View File

size 158

Loading…
Cancel
Save