update player prefab

This commit is contained in:
Cat Flynn 2021-03-05 18:00:50 +00:00
parent dba218cc7e
commit 143b3c2a7e
3 changed files with 132 additions and 4 deletions

View File

@ -17,7 +17,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 0
--- !u!4 &13726836532781129 --- !u!4 &13726836532781129
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -96,6 +96,7 @@ GameObject:
- component: {fileID: 13726836969441782} - component: {fileID: 13726836969441782}
- component: {fileID: 13726837176080779} - component: {fileID: 13726837176080779}
- component: {fileID: 3320306143821152633} - component: {fileID: 3320306143821152633}
- component: {fileID: 4397130014773710380}
- component: {fileID: 4537570682397675320} - component: {fileID: 4537570682397675320}
- component: {fileID: 2167937473989734407} - component: {fileID: 2167937473989734407}
m_Layer: 0 m_Layer: 0
@ -315,6 +316,20 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 005bf73dff204914c9e1bbd60c843451, type: 3} m_Script: {fileID: 11500000, guid: 005bf73dff204914c9e1bbd60c843451, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
--- !u!114 &4397130014773710380
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 13726836969441781}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a5bca717120a7734c8c5fa335cd78c1f, type: 3}
m_Name:
m_EditorClassIdentifier:
_animator: {fileID: 2255102273586669739}
_controller: {fileID: 13726836969441545}
--- !u!114 &4537570682397675320 --- !u!114 &4537570682397675320
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -397,12 +412,13 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 13726837642651461} m_GameObject: {fileID: 13726837642651461}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0.85, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.8, y: 0.85, z: 0.8} m_LocalScale: {x: 0.8, y: 0.85, z: 0.8}
m_Children: m_Children:
- {fileID: 3910566560202895193} - {fileID: 3910566560202895193}
- {fileID: 13726836532781129} - {fileID: 13726836532781129}
- {fileID: 7741442472643640439} - {fileID: 7741442472643640439}
- {fileID: 2883153423186464107}
m_Father: {fileID: 13726836969441544} m_Father: {fileID: 13726836969441544}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -421,7 +437,7 @@ MeshRenderer:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 13726837642651461} m_GameObject: {fileID: 13726837642651461}
m_Enabled: 1 m_Enabled: 0
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1 m_DynamicOccludee: 1
@ -503,7 +519,7 @@ MeshRenderer:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1703779518772407877} m_GameObject: {fileID: 1703779518772407877}
m_Enabled: 1 m_Enabled: 0
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1 m_DynamicOccludee: 1
@ -550,6 +566,25 @@ SphereCollider:
serializedVersion: 2 serializedVersion: 2
m_Radius: 0.38 m_Radius: 0.38
m_Center: {x: 0, y: 0, z: 0} m_Center: {x: 0, y: 0, z: 0}
--- !u!95 &2255102273586669739
Animator:
serializedVersion: 3
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2542515566603360209}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: 1b223a4181bb94640936f28ce880ce7b, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!1 &2625718689509414053 --- !u!1 &2625718689509414053
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -643,3 +678,70 @@ Light:
m_UseViewFrustumForShadowCasterCull: 1 m_UseViewFrustumForShadowCasterCull: 1
m_ShadowRadius: 0 m_ShadowRadius: 0
m_ShadowAngle: 0 m_ShadowAngle: 0
--- !u!1001 &3425477616327879296
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 13726837642651460}
m_Modifications:
- target: {fileID: -8679921383154817045, guid: dc837b43c4e9cd44d8b86fefed7e0f0e, type: 3}
propertyPath: m_RootOrder
value: 3
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: dc837b43c4e9cd44d8b86fefed7e0f0e, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: dc837b43c4e9cd44d8b86fefed7e0f0e, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: dc837b43c4e9cd44d8b86fefed7e0f0e, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: dc837b43c4e9cd44d8b86fefed7e0f0e, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: dc837b43c4e9cd44d8b86fefed7e0f0e, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: dc837b43c4e9cd44d8b86fefed7e0f0e, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: dc837b43c4e9cd44d8b86fefed7e0f0e, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: dc837b43c4e9cd44d8b86fefed7e0f0e, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: dc837b43c4e9cd44d8b86fefed7e0f0e, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: dc837b43c4e9cd44d8b86fefed7e0f0e, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: dc837b43c4e9cd44d8b86fefed7e0f0e, type: 3}
propertyPath: m_Name
value: A_Idle
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: dc837b43c4e9cd44d8b86fefed7e0f0e, type: 3}
--- !u!1 &2542515566603360209 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: dc837b43c4e9cd44d8b86fefed7e0f0e, type: 3}
m_PrefabInstance: {fileID: 3425477616327879296}
m_PrefabAsset: {fileID: 0}
--- !u!4 &2883153423186464107 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: dc837b43c4e9cd44d8b86fefed7e0f0e, type: 3}
m_PrefabInstance: {fileID: 3425477616327879296}
m_PrefabAsset: {fileID: 0}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerAnimationController : MonoBehaviour
{
[SerializeField] private Animator _animator;
[SerializeField] private CharacterController _controller;
private void Update()
{
_animator.SetBool("Is Walking", _controller.velocity.magnitude > 0.01f);
}
}

View File

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