Browse Source

Added Animations to remote player

master
JoshuaReason 5 years ago
parent
commit
8e5be6fbef
11 changed files with 1871 additions and 570 deletions
  1. +494
    -505
      Assets/Prefabs/RealLocalPlayer.prefab
  2. +1333
    -65
      Assets/Prefabs/RealRemotePlayer.prefab
  3. +8
    -0
      Assets/Scipts/PlayerControllers.meta
  4. +0
    -0
      Assets/Scipts/PlayerControllers/LocalPlayer.cs
  5. +0
    -0
      Assets/Scipts/PlayerControllers/LocalPlayer.cs.meta
  6. +0
    -0
      Assets/Scipts/PlayerControllers/Player.cs
  7. +0
    -0
      Assets/Scipts/PlayerControllers/Player.cs.meta
  8. +25
    -0
      Assets/Scipts/PlayerControllers/RemotePlayer.cs
  9. +11
    -0
      Assets/Scipts/PlayerControllers/RemotePlayer.cs.meta
  10. +0
    -0
      Assets/Scipts/Utility/IPGrabber.cs
  11. +0
    -0
      Assets/Scipts/Utility/IPGrabber.cs.meta

+ 494
- 505
Assets/Prefabs/RealLocalPlayer.prefab
File diff suppressed because it is too large
View File


+ 1333
- 65
Assets/Prefabs/RealRemotePlayer.prefab
File diff suppressed because it is too large
View File


+ 8
- 0
Assets/Scipts/PlayerControllers.meta View File

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

Assets/LocalPlayer.cs → Assets/Scipts/PlayerControllers/LocalPlayer.cs View File


Assets/LocalPlayer.cs.meta → Assets/Scipts/PlayerControllers/LocalPlayer.cs.meta View File


Assets/Scipts/Player.cs → Assets/Scipts/PlayerControllers/Player.cs View File


Assets/Scipts/Player.cs.meta → Assets/Scipts/PlayerControllers/Player.cs.meta View File


+ 25
- 0
Assets/Scipts/PlayerControllers/RemotePlayer.cs View File

@ -0,0 +1,25 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RemotePlayer : Player {
public Animator Animator;
private float walkSpeed;
private Vector3 lastPosition;
protected override void Update()
{
DoAnimation();
base.Update();
}
private void DoAnimation()
{
Vector3 dir = lastPosition - transform.position;
Animator.SetFloat("WalkSpeed", dir.magnitude);
transform.forward = dir.normalized;
}
}

+ 11
- 0
Assets/Scipts/PlayerControllers/RemotePlayer.cs.meta View File

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

Assets/Scipts/IPGrabber.cs → Assets/Scipts/Utility/IPGrabber.cs View File


Assets/Scipts/IPGrabber.cs.meta → Assets/Scipts/Utility/IPGrabber.cs.meta View File


Loading…
Cancel
Save