Browse Source

Added Character Animations

master
JoshuaReason 5 years ago
parent
commit
eb6e1bc0ff
23 changed files with 2505 additions and 90 deletions
  1. +8
    -0
      Assets/Animations.meta
  2. +186
    -0
      Assets/Animations/CharacterController.controller
  3. +8
    -0
      Assets/Animations/CharacterController.controller.meta
  4. +3
    -0
      Assets/Animations/Character_Animate.fbx
  5. +174
    -0
      Assets/Animations/Character_Animate.fbx.meta
  6. +3
    -0
      Assets/Animations/Character_IdleCharacter_Idle.fbx
  7. +201
    -0
      Assets/Animations/Character_IdleCharacter_Idle.fbx.meta
  8. +3
    -0
      Assets/Animations/Character_PickUp.fbx
  9. +201
    -0
      Assets/Animations/Character_PickUp.fbx.meta
  10. +3
    -0
      Assets/Animations/TestWalk.fbx
  11. +201
    -0
      Assets/Animations/TestWalk.fbx.meta
  12. +63
    -2
      Assets/LocalPlayer.cs
  13. +1359
    -19
      Assets/Prefabs/RealLocalPlayer.prefab
  14. +0
    -17
      Assets/Scipts/CharacterMovement.cs
  15. +1
    -44
      Assets/Scipts/Map.cs
  16. +1
    -1
      Assets/Scipts/Multiplayer/Client/ClientManager.cs
  17. +60
    -1
      Assets/Scipts/Player.cs
  18. +8
    -0
      Assets/Shaders.meta
  19. +8
    -0
      Assets/WorldAssets.meta
  20. +8
    -0
      Assets/WorldAssets/Models.meta
  21. +2
    -2
      ProjectSettings/EditorBuildSettings.asset
  22. +2
    -2
      ProjectSettings/GraphicsSettings.asset
  23. +2
    -2
      ProjectSettings/UnityConnectSettings.asset

+ 8
- 0
Assets/Animations.meta View File

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

+ 186
- 0
Assets/Animations/CharacterController.controller View File

@ -0,0 +1,186 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: CharacterController
serializedVersion: 5
m_AnimatorParameters:
- m_Name: WalkSpeed
m_Type: 1
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
- m_Name: PickUp
m_Type: 9
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: 1107254025396549500}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!206 &206623138559818834
BlendTree:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Blend Tree
m_Childs:
- serializedVersion: 2
m_Motion: {fileID: 7400000, guid: bd9a5f058e048cd49a4ca8566dd4d8e7, type: 3}
m_Threshold: 0
m_Position: {x: 0, y: 0}
m_TimeScale: 1
m_CycleOffset: 0
m_DirectBlendParameter: WalkSpeed
m_Mirror: 0
- serializedVersion: 2
m_Motion: {fileID: 7400000, guid: 5e6441716cdffff40b7d37472b58522d, type: 3}
m_Threshold: 1
m_Position: {x: 0, y: 0}
m_TimeScale: 1
m_CycleOffset: 0
m_DirectBlendParameter: WalkSpeed
m_Mirror: 0
m_BlendParameter: WalkSpeed
m_BlendParameterY: Blend
m_MinThreshold: 0
m_MaxThreshold: 1
m_UseAutomaticThresholds: 1
m_NormalizedBlendValues: 0
m_BlendType: 0
--- !u!1101 &1101485998117681898
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102422810112928228}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.8397436
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101516048483575740
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: PickUp
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102570402557220086}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.04112649
m_TransitionOffset: 0
m_ExitTime: 0.8913044
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &1102422810112928228
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Blend Tree
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101516048483575740}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 206623138559818834}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &1102570402557220086
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: PickUp
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101485998117681898}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: c6fb98988f1ee6a43948c501b2e31c89, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1107 &1107254025396549500
AnimatorStateMachine:
serializedVersion: 5
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 1102422810112928228}
m_Position: {x: 472.30035, y: 273.0841, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102570402557220086}
m_Position: {x: 468, y: 408, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 1102422810112928228}

+ 8
- 0
Assets/Animations/CharacterController.controller.meta View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b8ccd80bd1d70dd44a5d8a54d14a16c2
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 9100000
userData:
assetBundleName:
assetBundleVariant:

+ 3
- 0
Assets/Animations/Character_Animate.fbx View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7219c608304eeec56a75fd8202c60d6801cb9e99fc3f0ec38e918c05a01a68b9
size 324176

+ 174
- 0
Assets/Animations/Character_Animate.fbx.meta View File

@ -0,0 +1,174 @@
fileFormatVersion: 2
guid: 236e7961efac5a74bb87438b563e964a
ModelImporter:
serializedVersion: 23
fileIDToRecycleName:
100000: Arms
100002: Body
100004: Button
100006: //RootNode
100008: Character_Bear1
100010: CTRL_Main
100012: Hat1
100014: Legs
100016: QuickRigCharacter_Hips
100018: QuickRigCharacter_LeftArm
100020: QuickRigCharacter_LeftForeArm
100022: QuickRigCharacter_LeftLeg
100024: QuickRigCharacter_LeftLeg1
100026: QuickRigCharacter_LeftUpLeg
100028: QuickRigCharacter_LeftUpLeg1
100030: QuickRigCharacter_Neck
100032: QuickRigCharacter_Reference
100034: QuickRigCharacter_RightArm
100036: QuickRigCharacter_RightForeArm
100038: QuickRigCharacter_Spine
100040: QuickRigCharacter_Spine1
100042: QuickRigCharacter_Spine2
100044: Scarf
100046: Scarf_1
100048: Scarf_2
100050: Scarf_2 1
100052: Scarf_3
100054: Scarf_3 1
100056: Scarf_4
100058: Scarf_4 1
100060: Scarf_5
100062: Scarf_5 1
100064: Scarf_6
400000: Arms
400002: Body
400004: Button
400006: //RootNode
400008: Character_Bear1
400010: CTRL_Main
400012: Hat1
400014: Legs
400016: QuickRigCharacter_Hips
400018: QuickRigCharacter_LeftArm
400020: QuickRigCharacter_LeftForeArm
400022: QuickRigCharacter_LeftLeg
400024: QuickRigCharacter_LeftLeg1
400026: QuickRigCharacter_LeftUpLeg
400028: QuickRigCharacter_LeftUpLeg1
400030: QuickRigCharacter_Neck
400032: QuickRigCharacter_Reference
400034: QuickRigCharacter_RightArm
400036: QuickRigCharacter_RightForeArm
400038: QuickRigCharacter_Spine
400040: QuickRigCharacter_Spine1
400042: QuickRigCharacter_Spine2
400044: Scarf
400046: Scarf_1
400048: Scarf_2
400050: Scarf_2 1
400052: Scarf_3
400054: Scarf_3 1
400056: Scarf_4
400058: Scarf_4 1
400060: Scarf_5
400062: Scarf_5 1
400064: Scarf_6
2100000: Pants
2100002: lambert1
2100004: Shirt1
2100006: Scarf1
2100008: Black
2100010: BearHat1
2100012: White
4300000: Legs
4300002: Arms
4300004: Scarf
4300006: Button
4300008: Hat1
4300010: Body
9500000: //RootNode
13700000: Arms
13700002: Body
13700004: Button
13700006: Hat1
13700008: Legs
13700010: Scarf
externalObjects: {}
materials:
importMaterials: 1
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 50
meshCompression: 0
addColliders: 0
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
optimizeMeshForGPU: 1
keepQuads: 0
weldVertices: 1
preserveHierarchy: 0
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVPackMargin: 4
useFileScale: 1
previousCalculatedGlobalScale: 0.35
hasPreviousCalculatedGlobalScale: 1
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
importAnimation: 1
copyAvatar: 0
humanDescription:
serializedVersion: 2
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
rootMotionBoneName:
rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1}
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
animationType: 2
humanoidOversampling: 1
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

+ 3
- 0
Assets/Animations/Character_IdleCharacter_Idle.fbx View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:22125e705e8ed81ecdd7593b9157956ae5e372a3b45d274699694204afc6c4aa
size 371680

+ 201
- 0
Assets/Animations/Character_IdleCharacter_Idle.fbx.meta View File

@ -0,0 +1,201 @@
fileFormatVersion: 2
guid: bd9a5f058e048cd49a4ca8566dd4d8e7
ModelImporter:
serializedVersion: 23
fileIDToRecycleName:
100000: Arms
100002: Body
100004: Button
100006: Character_Bear1
100008: //RootNode
100010: Hat1
100012: Legs
100014: QuickRigCharacter_Hips
100016: QuickRigCharacter_LeftArm
100018: QuickRigCharacter_LeftForeArm
100020: QuickRigCharacter_LeftLeg
100022: QuickRigCharacter_LeftLeg1
100024: QuickRigCharacter_LeftUpLeg
100026: QuickRigCharacter_LeftUpLeg1
100028: QuickRigCharacter_Neck
100030: QuickRigCharacter_Reference
100032: QuickRigCharacter_RightArm
100034: QuickRigCharacter_RightForeArm
100036: QuickRigCharacter_Spine
100038: QuickRigCharacter_Spine1
100040: QuickRigCharacter_Spine2
100042: Scarf
100044: Scarf_1
100046: Scarf_2
100048: Scarf_2 1
100050: Scarf_3
100052: Scarf_3 1
100054: Scarf_4
100056: Scarf_4 1
100058: Scarf_5
100060: Scarf_5 1
100062: Scarf_6
400000: Arms
400002: Body
400004: Button
400006: Character_Bear1
400008: //RootNode
400010: Hat1
400012: Legs
400014: QuickRigCharacter_Hips
400016: QuickRigCharacter_LeftArm
400018: QuickRigCharacter_LeftForeArm
400020: QuickRigCharacter_LeftLeg
400022: QuickRigCharacter_LeftLeg1
400024: QuickRigCharacter_LeftUpLeg
400026: QuickRigCharacter_LeftUpLeg1
400028: QuickRigCharacter_Neck
400030: QuickRigCharacter_Reference
400032: QuickRigCharacter_RightArm
400034: QuickRigCharacter_RightForeArm
400036: QuickRigCharacter_Spine
400038: QuickRigCharacter_Spine1
400040: QuickRigCharacter_Spine2
400042: Scarf
400044: Scarf_1
400046: Scarf_2
400048: Scarf_2 1
400050: Scarf_3
400052: Scarf_3 1
400054: Scarf_4
400056: Scarf_4 1
400058: Scarf_5
400060: Scarf_5 1
400062: Scarf_6
2100000: Pants
2100002: lambert1
2100004: Shirt1
2100006: Scarf1
2100008: Black
2100010: BearHat1
2100012: White
4300000: Legs
4300002: Arms
4300004: Scarf
4300006: Button
4300008: Hat1
4300010: Body
7400000: Character_Idle
9500000: //RootNode
13700000: Arms
13700002: Body
13700004: Button
13700006: Hat1
13700008: Legs
13700010: Scarf
externalObjects: {}
materials:
importMaterials: 1
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations:
- serializedVersion: 16
name: Character_Idle
takeName: Character_Idle
firstFrame: 1
lastFrame: 77
wrapMode: 0
orientationOffsetY: 0
level: 0
cycleOffset: 0
loop: 0
hasAdditiveReferencePose: 0
loopTime: 1
loopBlend: 0
loopBlendOrientation: 0
loopBlendPositionY: 0
loopBlendPositionXZ: 0
keepOriginalOrientation: 0
keepOriginalPositionY: 1
keepOriginalPositionXZ: 0
heightFromFeet: 0
mirror: 0
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
curves: []
events: []
transformMask: []
maskType: 3
maskSource: {instanceID: 0}
additiveReferencePoseFrame: 0
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 35
meshCompression: 0
addColliders: 0
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
optimizeMeshForGPU: 1
keepQuads: 0
weldVertices: 1
preserveHierarchy: 0
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVPackMargin: 4
useFileScale: 1
previousCalculatedGlobalScale: 0.01
hasPreviousCalculatedGlobalScale: 1
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
importAnimation: 1
copyAvatar: 0
humanDescription:
serializedVersion: 2
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
rootMotionBoneName:
rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1}
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
animationType: 2
humanoidOversampling: 1
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

+ 3
- 0
Assets/Animations/Character_PickUp.fbx View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:867f281ed46a41b1583f5bd36b6d43da974ce26fe0898c9a03678591e1d9538d
size 337120

+ 201
- 0
Assets/Animations/Character_PickUp.fbx.meta View File

@ -0,0 +1,201 @@
fileFormatVersion: 2
guid: c6fb98988f1ee6a43948c501b2e31c89
ModelImporter:
serializedVersion: 23
fileIDToRecycleName:
100000: Arms
100002: Body
100004: Button
100006: Character_Bear1
100008: //RootNode
100010: Hat1
100012: Legs
100014: QuickRigCharacter_Hips
100016: QuickRigCharacter_LeftArm
100018: QuickRigCharacter_LeftForeArm
100020: QuickRigCharacter_LeftLeg
100022: QuickRigCharacter_LeftLeg1
100024: QuickRigCharacter_LeftUpLeg
100026: QuickRigCharacter_LeftUpLeg1
100028: QuickRigCharacter_Neck
100030: QuickRigCharacter_Reference
100032: QuickRigCharacter_RightArm
100034: QuickRigCharacter_RightForeArm
100036: QuickRigCharacter_Spine
100038: QuickRigCharacter_Spine1
100040: QuickRigCharacter_Spine2
100042: Scarf
100044: Scarf_1
100046: Scarf_2
100048: Scarf_2 1
100050: Scarf_3
100052: Scarf_3 1
100054: Scarf_4
100056: Scarf_4 1
100058: Scarf_5
100060: Scarf_5 1
100062: Scarf_6
400000: Arms
400002: Body
400004: Button
400006: Character_Bear1
400008: //RootNode
400010: Hat1
400012: Legs
400014: QuickRigCharacter_Hips
400016: QuickRigCharacter_LeftArm
400018: QuickRigCharacter_LeftForeArm
400020: QuickRigCharacter_LeftLeg
400022: QuickRigCharacter_LeftLeg1
400024: QuickRigCharacter_LeftUpLeg
400026: QuickRigCharacter_LeftUpLeg1
400028: QuickRigCharacter_Neck
400030: QuickRigCharacter_Reference
400032: QuickRigCharacter_RightArm
400034: QuickRigCharacter_RightForeArm
400036: QuickRigCharacter_Spine
400038: QuickRigCharacter_Spine1
400040: QuickRigCharacter_Spine2
400042: Scarf
400044: Scarf_1
400046: Scarf_2
400048: Scarf_2 1
400050: Scarf_3
400052: Scarf_3 1
400054: Scarf_4
400056: Scarf_4 1
400058: Scarf_5
400060: Scarf_5 1
400062: Scarf_6
2100000: Pants
2100002: lambert1
2100004: Shirt1
2100006: Scarf1
2100008: Black
2100010: BearHat1
2100012: White
4300000: Legs
4300002: Arms
4300004: Scarf
4300006: Button
4300008: Hat1
4300010: Body
7400000: Pickup
9500000: //RootNode
13700000: Arms
13700002: Body
13700004: Button
13700006: Hat1
13700008: Legs
13700010: Scarf
externalObjects: {}
materials:
importMaterials: 1
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations:
- serializedVersion: 16
name: Pickup
takeName: TestWalk
firstFrame: 1
lastFrame: 40
wrapMode: 0
orientationOffsetY: 0
level: 0
cycleOffset: 0
loop: 0
hasAdditiveReferencePose: 0
loopTime: 0
loopBlend: 0
loopBlendOrientation: 0
loopBlendPositionY: 0
loopBlendPositionXZ: 0
keepOriginalOrientation: 0
keepOriginalPositionY: 1
keepOriginalPositionXZ: 0
heightFromFeet: 0
mirror: 0
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
curves: []
events: []
transformMask: []
maskType: 3
maskSource: {instanceID: 0}
additiveReferencePoseFrame: 0
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 35
meshCompression: 0
addColliders: 0
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
optimizeMeshForGPU: 1
keepQuads: 0
weldVertices: 1
preserveHierarchy: 0
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVPackMargin: 4
useFileScale: 1
previousCalculatedGlobalScale: 0.01
hasPreviousCalculatedGlobalScale: 1
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
importAnimation: 1
copyAvatar: 0
humanDescription:
serializedVersion: 2
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
rootMotionBoneName:
rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1}
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
animationType: 2
humanoidOversampling: 1
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

+ 3
- 0
Assets/Animations/TestWalk.fbx View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5a6248b5e77e287ffa0fb877e3c6c21f8a4fbbd3f4e8befc2f54a02a34b41787
size 321536

+ 201
- 0
Assets/Animations/TestWalk.fbx.meta View File

@ -0,0 +1,201 @@
fileFormatVersion: 2
guid: 5e6441716cdffff40b7d37472b58522d
ModelImporter:
serializedVersion: 23
fileIDToRecycleName:
100000: Arms
100002: Body
100004: Button
100006: Character_Bear1
100008: Hat1
100010: Legs
100012: QuickRigCharacter_Hips
100014: QuickRigCharacter_LeftArm
100016: QuickRigCharacter_LeftForeArm
100018: QuickRigCharacter_LeftLeg
100020: QuickRigCharacter_LeftLeg1
100022: QuickRigCharacter_LeftUpLeg
100024: QuickRigCharacter_LeftUpLeg1
100026: QuickRigCharacter_Neck
100028: QuickRigCharacter_Reference
100030: QuickRigCharacter_RightArm
100032: QuickRigCharacter_RightForeArm
100034: QuickRigCharacter_Spine
100036: QuickRigCharacter_Spine1
100038: QuickRigCharacter_Spine2
100040: Scarf
100042: Scarf_1
100044: Scarf_2
100046: Scarf_2 1
100048: Scarf_3
100050: Scarf_3 1
100052: Scarf_4
100054: Scarf_4 1
100056: Scarf_5
100058: Scarf_5 1
100060: Scarf_6
100062: //RootNode
400000: Arms
400002: Body
400004: Button
400006: Character_Bear1
400008: Hat1
400010: Legs
400012: QuickRigCharacter_Hips
400014: QuickRigCharacter_LeftArm
400016: QuickRigCharacter_LeftForeArm
400018: QuickRigCharacter_LeftLeg
400020: QuickRigCharacter_LeftLeg1
400022: QuickRigCharacter_LeftUpLeg
400024: QuickRigCharacter_LeftUpLeg1
400026: QuickRigCharacter_Neck
400028: QuickRigCharacter_Reference
400030: QuickRigCharacter_RightArm
400032: QuickRigCharacter_RightForeArm
400034: QuickRigCharacter_Spine
400036: QuickRigCharacter_Spine1
400038: QuickRigCharacter_Spine2
400040: Scarf
400042: Scarf_1
400044: Scarf_2
400046: Scarf_2 1
400048: Scarf_3
400050: Scarf_3 1
400052: Scarf_4
400054: Scarf_4 1
400056: Scarf_5
400058: Scarf_5 1
400060: Scarf_6
400062: //RootNode
2100000: Pants
2100002: lambert1
2100004: Shirt1
2100006: Scarf1
2100008: Black
2100010: BearHat1
2100012: White
4300000: Legs
4300002: Arms
4300004: Scarf
4300006: Button
4300008: Hat1
4300010: Body
7400000: TestWalk
9500000: //RootNode
13700000: Arms
13700002: Body
13700004: Button
13700006: Hat1
13700008: Legs
13700010: Scarf
externalObjects: {}
materials:
importMaterials: 1
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations:
- serializedVersion: 16
name: TestWalk
takeName: TestWalk
firstFrame: 1
lastFrame: 24
wrapMode: 0
orientationOffsetY: 0
level: 0
cycleOffset: 0
loop: 0
hasAdditiveReferencePose: 0
loopTime: 1
loopBlend: 0
loopBlendOrientation: 0
loopBlendPositionY: 0
loopBlendPositionXZ: 0
keepOriginalOrientation: 0
keepOriginalPositionY: 1
keepOriginalPositionXZ: 0
heightFromFeet: 0
mirror: 0
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
curves: []
events: []
transformMask: []
maskType: 3
maskSource: {instanceID: 0}
additiveReferencePoseFrame: 0
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 35
meshCompression: 0
addColliders: 0
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
optimizeMeshForGPU: 1
keepQuads: 0
weldVertices: 1
preserveHierarchy: 0
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVPackMargin: 4
useFileScale: 1
previousCalculatedGlobalScale: 0.01
hasPreviousCalculatedGlobalScale: 1
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
importAnimation: 1
copyAvatar: 0
humanDescription:
serializedVersion: 2
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
rootMotionBoneName:
rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1}
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
animationType: 2
humanoidOversampling: 1
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

+ 63
- 2
Assets/LocalPlayer.cs View File

@ -2,14 +2,75 @@
using System.Collections.Generic;
using UnityEngine;
public class LocalPlayer : MonoBehaviour {
public class LocalPlayer : Player {
public CharacterController charControl;
private void Update()
public Animator Animator;
public float Speed = 5;
private float animWalkSpeed = 0;
protected override void Update()
{
ApplyGravity();
ApplyInput();
Teleport();
base.Update();
}
private void ApplyGravity()
{
if (!charControl.isGrounded)
{
charControl.SimpleMove(new Vector3(0.0f, -5.0f * Time.deltaTime, 0.0f));
}
}
private void ApplyInput()
{
if (Input.GetMouseButton(0))
{
Vector3 mousePos = new Vector3(Input.mousePosition.x, 0.0f, Input.mousePosition.y);
Vector3 screenCentre = new Vector3(Screen.width / 2, 0.0F, Screen.height / 2);
Vector3 movePos = mousePos - screenCentre;
movePos.x = movePos.x / Screen.width;
movePos.z = movePos.z / Screen.height;
charControl.Move(movePos * Speed * Time.deltaTime);
animWalkSpeed = Mathf.Clamp01(movePos.magnitude * 3);
playerModel.transform.LookAt(playerModel.transform.position + movePos, Vector3.up);
}else if (animWalkSpeed > 0)
{
animWalkSpeed -= 0.1f;
}
Animator.SetFloat("WalkSpeed", animWalkSpeed);
}
void Teleport()
{
if (map == null)
return;
if (transform.position.x > map.maxX)
{
transform.position = new Vector3(map.minX, transform.position.y, transform.position.z);
}
else if (transform.position.x < map.minX)
{
transform.position = new Vector3(map.maxX, transform.position.y, transform.position.z);
}
if (transform.position.z > map.maxZ)
{
transform.position = new Vector3(transform.position.x, transform.position.y, map.minZ);
}
else if (transform.position.z < map.minZ)
{
transform.position = new Vector3(transform.position.x, transform.position.y, map.maxZ);
}
}
}

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


+ 0
- 17
Assets/Scipts/CharacterMovement.cs View File

@ -23,23 +23,6 @@ public class CharacterMovement : MonoBehaviour {
cam = localPlayer.GetComponentInChildren<Camera>();
}
//Public movement functions :)
private void Update()
{
if (Input.GetMouseButton(0))
{
Vector3 mousePos = new Vector3(Input.mousePosition.x, 0.0f, Input.mousePosition.y);
Vector3 screenCentre = new Vector3(Screen.width / 2, 0.0F, Screen.height / 2);
Vector3 movePos = mousePos - screenCentre;
movePos.x = movePos.x / Screen.width;
movePos.z = movePos.z / Screen.height;
localPlayer.GetComponent<CharacterController>().Move(movePos * Speed * Time.deltaTime);
Debug.Log("Movepos" + movePos + " speed " + Speed);
}
}
public bool CheckNearby()
{
for (int i = 0; i < Players.Count; i++)

+ 1
- 44
Assets/Scipts/Map.cs View File

@ -39,27 +39,10 @@ public class Map : MonoBehaviour
//Create dummy players for the world wrapping
void CreateDummys()
{
foreach (GameObject Player in Players)
{
Player PS = Player.GetComponent<Player>();
Transform PT = Player.transform;
Transform model = PT.Find("Model");
PS.dummies.Add(Instantiate(model, new Vector3(PT.position.x -TileSize * MapDimensions.x, PT.position.y, PT.position.z), transform.rotation, PT).gameObject);
PS.dummies.Add(Instantiate(model, new Vector3(PT.position.x + TileSize * MapDimensions.x, PT.position.y, PT.position.z), transform.rotation, PT).gameObject);
PS.dummies.Add(Instantiate(model, new Vector3(PT.position.x, PT.position.y, PT.position.z - TileSize * MapDimensions.y), transform.rotation, PT).gameObject);
PS.dummies.Add(Instantiate(model, new Vector3(PT.position.x, PT.position.y, PT.position.z + TileSize * MapDimensions.y), transform.rotation, PT).gameObject);
foreach (GameObject dummie in PS.dummies)
{
dummie.transform.parent = model;
foreach (Collider col in dummie.GetComponentsInChildren<Collider>())
{
col.enabled = false;
}
}
PS.CreateDummies(this);
}
}
@ -194,32 +177,6 @@ public class Map : MonoBehaviour
#endregion
void Update()
{
Teleport();
}
void Teleport()
{
Transform PT = LocalPlayer.transform;
if (PT.position.x > maxX)
{
PT.position = new Vector3(minX, PT.position.y, PT.position.z);
}
else if (PT.position.x < minX)
{
PT.position = new Vector3(maxX, PT.position.y, PT.position.z);
}
if (PT.position.z > maxZ)
{
PT.position = new Vector3(PT.position.x, PT.position.y, minZ);
}
else if (PT.position.z < minZ)
{
PT.position = new Vector3(PT.position.x, PT.position.y, maxZ);
}
}
}
//EXTRA STUFF, PLEASE IGNORE

+ 1
- 1
Assets/Scipts/Multiplayer/Client/ClientManager.cs View File

@ -84,7 +84,7 @@ namespace Multiplayer
if (!IsConnected)
Debug.Log("Player not connected to server");
Debug.Log("Sending message to server");
//Debug.Log("Sending message to server");
Client.SendByChannel(msgType, msg, (int)channel);
}

+ 60
- 1
Assets/Scipts/Player.cs View File

@ -2,8 +2,67 @@
using System.Collections.Generic;
using UnityEngine;
public class Player : MonoBehaviour {
public class Player : MonoBehaviour
{
public List<GameObject> dummies;
public Vegetable heldVeggie;
public GameObject playerModel;
protected Map map;
private Animator playerAnim;
private List<Animator> dummieAnims = new List<Animator>();
public float scale = 0.1f;
public void Start()
{
playerAnim = playerModel.GetComponent<Animator>();
}
protected virtual void Update()
{
UpdateDummies();
}
public void CreateDummies(Map map)
{
this.map = map;
dummies.Add(Instantiate(playerModel, new Vector3(transform.position.x - map.TileSize * map.MapDimensions.x, transform.position.y, transform.position.z), transform.rotation, transform).gameObject);
dummies.Add(Instantiate(playerModel, new Vector3(transform.position.x + map.TileSize * map.MapDimensions.x, transform.position.y, transform.position.z), transform.rotation, transform).gameObject);
dummies.Add(Instantiate(playerModel, new Vector3(transform.position.x, transform.position.y, transform.position.z - map.TileSize * map.MapDimensions.y), transform.rotation, transform).gameObject);
dummies.Add(Instantiate(playerModel, new Vector3(transform.position.x, transform.position.y, transform.position.z + map.TileSize * map.MapDimensions.y), transform.rotation, transform).gameObject);
foreach (GameObject dummie in dummies)
{
Debug.Log(dummie.name);
dummieAnims.Add(dummie.GetComponentInChildren<Animator>());
foreach (Collider col in dummie.GetComponentsInChildren<Collider>())
{
col.enabled = false;
}
}
}
public void UpdateDummies()
{
dummies[0].transform.position = transform.position - (Vector3.right * (map.TileSize * map.MapDimensions.x * scale));
dummies[1].transform.position = transform.position + (Vector3.right * (map.TileSize * map.MapDimensions.x * scale));
dummies[2].transform.position = transform.position - (Vector3.forward * (map.TileSize * map.MapDimensions.y * scale));
dummies[3].transform.position = transform.position + (Vector3.forward * (map.TileSize * map.MapDimensions.y * scale));
int count = 0;
foreach (GameObject dummie in dummies)
{
dummie.transform.rotation = playerModel.transform.rotation;
Debug.Log(dummieAnims[count]);
dummieAnims[count].SetFloat("WalkSpeed", playerAnim.GetFloat("WalkSpeed"));
if (playerAnim.GetBool("PickUp"))
dummieAnims[count].SetTrigger("PickUp");
}
}
}

+ 8
- 0
Assets/Shaders.meta View File

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

+ 8
- 0
Assets/WorldAssets.meta View File

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

+ 8
- 0
Assets/WorldAssets/Models.meta View File

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

+ 2
- 2
ProjectSettings/EditorBuildSettings.asset View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c64c0a8ab387e76ea0a66bea48669e6993ffdbbc6c34f74a7fabe55bd6e8ca93
size 552
oid sha256:005bcacf140480789b85b077d6ce22c77bb09f29062728b3c4d8795d86cd8262
size 652

+ 2
- 2
ProjectSettings/GraphicsSettings.asset View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f9f8e310e4e28e01748ac4b4549e66da30e7617e70e83b5938b925745203ca4f
size 1937
oid sha256:d962667a1bdf2dc8449a4c3db3016f5bd41e995c1f6e6215d0eef6109a51cbec
size 2018

+ 2
- 2
ProjectSettings/UnityConnectSettings.asset View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:71c7f59b462224ebdb7113c7af007fc709ea1f8977c19a5dc5c74fb089ee3704
size 846
oid sha256:1f72e17e23719bf17ce5f260c5df3dbbcbc677879471b005e70f11cd4ec69c57
size 812

Loading…
Cancel
Save