Browse Source

Character animator, + fixed lightning for player 2

master
Joshua Reason 9 years ago
parent
commit
d460c79363
13 changed files with 3605 additions and 9 deletions
  1. BIN
      unity_Project/Assets/Character/4-10_Character_Animation_03_Clean 1.fbx
  2. +3549
    -0
      unity_Project/Assets/Character/4-10_Character_Animation_03_Clean 1.fbx.meta
  3. +5
    -7
      unity_Project/Assets/Character/9-10_Character_Animations_01_Clean.fbx.meta
  4. BIN
      unity_Project/Assets/Character/Character_Animation.controller
  5. BIN
      unity_Project/Assets/Materials/lambert2.mat
  6. +8
    -0
      unity_Project/Assets/Materials/lambert2.mat.meta
  7. +15
    -0
      unity_Project/Assets/Scripts/lazerRenderer.cs
  8. +12
    -0
      unity_Project/Assets/Scripts/lazerRenderer.cs.meta
  9. +9
    -0
      unity_Project/Assets/Scripts/magnetGun.cs
  10. +6
    -1
      unity_Project/Assets/Scripts/thirdPersonController.cs
  11. BIN
      unity_Project/Assets/_Scenes/MainLevel.unity
  12. BIN
      unity_Project/ProjectSettings/ProjectSettings.asset
  13. +1
    -1
      unity_Project/ProjectSettings/ProjectVersion.txt

BIN
unity_Project/Assets/Character/4-10_Character_Animation_03_Clean 1.fbx View File


+ 3549
- 0
unity_Project/Assets/Character/4-10_Character_Animation_03_Clean 1.fbx.meta
File diff suppressed because it is too large
View File


+ 5
- 7
unity_Project/Assets/Character/9-10_Character_Animations_01_Clean.fbx.meta View File

@ -662,13 +662,13 @@ ModelImporter:
name: GunForward name: GunForward
takeName: Take 001 takeName: Take 001
firstFrame: 90 firstFrame: 90
lastFrame: 90
lastFrame: 91
wrapMode: 0 wrapMode: 0
orientationOffsetY: 0 orientationOffsetY: 0
level: 0 level: 0
cycleOffset: 0 cycleOffset: 0
loop: 0 loop: 0
loopTime: 0
loopTime: 1
loopBlend: 0 loopBlend: 0
loopBlendOrientation: 0 loopBlendOrientation: 0
loopBlendPositionY: 0 loopBlendPositionY: 0
@ -1089,7 +1089,7 @@ ModelImporter:
- serializedVersion: 16 - serializedVersion: 16
name: Jump_Hang name: Jump_Hang
takeName: Take 001 takeName: Take 001
firstFrame: 115
firstFrame: 114
lastFrame: 115 lastFrame: 115
wrapMode: 0 wrapMode: 0
orientationOffsetY: 0 orientationOffsetY: 0
@ -1524,7 +1524,7 @@ ModelImporter:
level: 0 level: 0
cycleOffset: 0 cycleOffset: 0
loop: 0 loop: 0
loopTime: 0
loopTime: 1
loopBlend: 0 loopBlend: 0
loopBlendOrientation: 0 loopBlendOrientation: 0
loopBlendPositionY: 0 loopBlendPositionY: 0
@ -2801,7 +2801,7 @@ ModelImporter:
isReadable: 1 isReadable: 1
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1
globalScale: 15
meshCompression: 0 meshCompression: 0
addColliders: 0 addColliders: 0
importBlendShapes: 1 importBlendShapes: 1
@ -2834,10 +2834,8 @@ ModelImporter:
legStretch: .0500000007 legStretch: .0500000007
feetSpacing: 0 feetSpacing: 0
rootMotionBoneName: rootMotionBoneName:
hasTranslationDoF: 0
lastHumanDescriptionAvatarSource: {instanceID: 0} lastHumanDescriptionAvatarSource: {instanceID: 0}
animationType: 2 animationType: 2
humanoidOversampling: 1
additionalBone: 0 additionalBone: 0
userData: userData:
assetBundleName: assetBundleName:

BIN
unity_Project/Assets/Character/Character_Animation.controller View File


BIN
unity_Project/Assets/Materials/lambert2.mat View File


+ 8
- 0
unity_Project/Assets/Materials/lambert2.mat.meta View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 04987efa627aa124284d60a9334ab308
timeCreated: 1444280770
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

+ 15
- 0
unity_Project/Assets/Scripts/lazerRenderer.cs View File

@ -0,0 +1,15 @@
using UnityEngine;
using System.Collections;
public class lazerRenderer : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
}

+ 12
- 0
unity_Project/Assets/Scripts/lazerRenderer.cs.meta View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: a9b9cfd3af505d544bc4c9367cd41a61
timeCreated: 1444308265
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

+ 9
- 0
unity_Project/Assets/Scripts/magnetGun.cs View File

@ -156,6 +156,10 @@ public class magnetGun : MonoBehaviour {
if (item.tag == "moveable"){ if (item.tag == "moveable"){
playerController.animator.SetTrigger("startHolding");
playerController.animator.SetBool("Holding",true);
originalConstrants = item.attachedRigidbody.constraints; originalConstrants = item.attachedRigidbody.constraints;
originalGravity = item.attachedRigidbody.useGravity; originalGravity = item.attachedRigidbody.useGravity;
@ -212,6 +216,11 @@ public class magnetGun : MonoBehaviour {
private void dropItem(Collider item){ private void dropItem(Collider item){
if (item != null) { if (item != null) {
playerController.animator.SetTrigger("stopHolding");
playerController.animator.SetBool("Holding",false);
item.attachedRigidbody.useGravity = originalGravity; item.attachedRigidbody.useGravity = originalGravity;
item.attachedRigidbody.drag = 0.0f; item.attachedRigidbody.drag = 0.0f;
item.attachedRigidbody.constraints = originalConstrants; item.attachedRigidbody.constraints = originalConstrants;

+ 6
- 1
unity_Project/Assets/Scripts/thirdPersonController.cs View File

@ -100,12 +100,16 @@ public class thirdPersonController : MonoBehaviour {
applyGrip(); applyGrip();
applyJump (jumpHeight);
//if (!slowed)
applyJump (jumpHeight);
} }
animator.SetBool ("Grounded", grounded); animator.SetBool ("Grounded", grounded);
animator.SetFloat("Run speed",new Vector3 (rigidbody.velocity.x, 0.0f,rigidbody.velocity.z ).magnitude * Mathf.Sign(movementY)); animator.SetFloat("Run speed",new Vector3 (rigidbody.velocity.x, 0.0f,rigidbody.velocity.z ).magnitude * Mathf.Sign(movementY));
Vector3 side = transform.InverseTransformDirection (rigidbody.velocity).normalized;
animator.SetFloat ("Side",side.x);
rigidbody.AddForce (new Vector3 (0.0f, -9.81f,0.0f)); rigidbody.AddForce (new Vector3 (0.0f, -9.81f,0.0f));
curCollider = null; curCollider = null;
@ -143,6 +147,7 @@ public class thirdPersonController : MonoBehaviour {
if (movementY > 0 && this.name == "Player1") if (movementY > 0 && this.name == "Player1")
movementY = 0; movementY = 0;
} }
Vector3 velocity = new Vector3 (movementX, 0.0f, movementY) * curSpeed * Time.deltaTime; Vector3 velocity = new Vector3 (movementX, 0.0f, movementY) * curSpeed * Time.deltaTime;
//Debug.Log (velocity); //Debug.Log (velocity);

BIN
unity_Project/Assets/_Scenes/MainLevel.unity View File


BIN
unity_Project/ProjectSettings/ProjectSettings.asset View File


+ 1
- 1
unity_Project/ProjectSettings/ProjectVersion.txt View File

@ -1,2 +1,2 @@
m_EditorVersion: 5.2.0f3
m_EditorVersion: 5.1.2f1
m_StandardAssetsVersion: 0 m_StandardAssetsVersion: 0

Loading…
Cancel
Save