初期コミット
This commit is contained in:
1205
Assets/Yurowm/Demo/Demo Contract Killer.unity
Normal file
1205
Assets/Yurowm/Demo/Demo Contract Killer.unity
Normal file
File diff suppressed because it is too large
Load Diff
14
Assets/Yurowm/Demo/Demo Contract Killer.unity.meta
Normal file
14
Assets/Yurowm/Demo/Demo Contract Killer.unity.meta
Normal file
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 271d5cd62d6b0be46ba5b9850dae0cd4
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 29235
|
||||
packageName: Contract Killer
|
||||
packageVersion: 1.2
|
||||
assetPath: Assets/Yurowm/Demo/Demo Contract Killer.unity
|
||||
uploadId: 62633
|
||||
63
Assets/Yurowm/Demo/Demo Contract KillerSettings.lighting
Normal file
63
Assets/Yurowm/Demo/Demo Contract KillerSettings.lighting
Normal file
@@ -0,0 +1,63 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!850595691 &4890085278179872738
|
||||
LightingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Demo Contract KillerSettings
|
||||
serializedVersion: 9
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_RealtimeEnvironmentLighting: 1
|
||||
m_BounceScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_UsingShadowmask: 0
|
||||
m_BakeBackend: 2
|
||||
m_LightmapMaxSize: 1024
|
||||
m_LightmapSizeFixed: 0
|
||||
m_UseMipmapLimits: 1
|
||||
m_BakeResolution: 50
|
||||
m_Padding: 2
|
||||
m_LightmapCompression: 0
|
||||
m_AO: 1
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAO: 0
|
||||
m_MixedBakeMode: 1
|
||||
m_LightmapsBakeMode: 1
|
||||
m_FilterMode: 1
|
||||
m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ExportTrainingData: 0
|
||||
m_EnableWorkerProcessBaking: 1
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_RealtimeResolution: 1
|
||||
m_ForceWhiteAlbedo: 0
|
||||
m_ForceUpdates: 0
|
||||
m_PVRCulling: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVREnvironmentSampleCount: 512
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_PVRBounces: 2
|
||||
m_PVRMinBounces: 2
|
||||
m_PVREnvironmentImportanceSampling: 0
|
||||
m_PVRFilteringMode: 0
|
||||
m_PVRDenoiserTypeDirect: 0
|
||||
m_PVRDenoiserTypeIndirect: 0
|
||||
m_PVRDenoiserTypeAO: 0
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 1
|
||||
m_PVRFilteringGaussRadiusAO: 1
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_RespectSceneVisibilityWhenBakingGI: 0
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 80afd205918f343eaa2a17e71fc6fc1f
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 4890085278179872738
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Yurowm/Demo/Material.meta
Normal file
8
Assets/Yurowm/Demo/Material.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 80f4a636535bd4ca09433ccdd2305c8f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
36
Assets/Yurowm/Demo/Material/DarkSpot.mat
Normal file
36
Assets/Yurowm/Demo/Material/DarkSpot.mat
Normal file
@@ -0,0 +1,36 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: DarkSpot
|
||||
m_Shader: {fileID: 205, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: cf1ecb6f7e8d0e842856ac0bc3d02b7f, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _InvFade: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
15
Assets/Yurowm/Demo/Material/DarkSpot.mat.meta
Normal file
15
Assets/Yurowm/Demo/Material/DarkSpot.mat.meta
Normal file
@@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: be366c6ff2ed5a540a28b5aabc876d83
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 29235
|
||||
packageName: Contract Killer
|
||||
packageVersion: 1.2
|
||||
assetPath: Assets/Yurowm/Demo/Material/DarkSpot.mat
|
||||
uploadId: 62633
|
||||
8
Assets/Yurowm/Demo/Prefabs.meta
Normal file
8
Assets/Yurowm/Demo/Prefabs.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1345803efc26a410aac3c40d853c4ce3
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
214
Assets/Yurowm/Demo/Prefabs/Button.prefab
Normal file
214
Assets/Yurowm/Demo/Prefabs/Button.prefab
Normal file
@@ -0,0 +1,214 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &100000
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 22400000}
|
||||
- component: {fileID: 22200000}
|
||||
- component: {fileID: 11400002}
|
||||
- component: {fileID: 11400000}
|
||||
m_Layer: 5
|
||||
m_Name: Button
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &22400000
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100000}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 22400002}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &22200000
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100000}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &11400002
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100000}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100000}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 0.8161765, g: 0.8161765, b: 0.8161765, a: 1}
|
||||
m_HighlightedColor: {r: 0.66176474, g: 0.66176474, b: 0.66176474, a: 1}
|
||||
m_PressedColor: {r: 0.3897059, g: 0.82322526, b: 1, a: 1}
|
||||
m_SelectedColor: {r: 0.66176474, g: 0.66176474, b: 0.66176474, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Highlighted
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 11400002}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 0}
|
||||
m_TargetAssemblyTypeName:
|
||||
m_MethodName: SetArsenal
|
||||
m_Mode: 5
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument: Empty
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!1 &100002
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 22400002}
|
||||
- component: {fileID: 22200002}
|
||||
- component: {fileID: 11400004}
|
||||
m_Layer: 5
|
||||
m_Name: Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &22400002
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100002}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 22400000}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: -10, y: -10}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &22200002
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100002}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &11400004
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 100002}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 12
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 1
|
||||
m_LineSpacing: 1
|
||||
m_Text: Empty
|
||||
15
Assets/Yurowm/Demo/Prefabs/Button.prefab.meta
Normal file
15
Assets/Yurowm/Demo/Prefabs/Button.prefab.meta
Normal file
@@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ac464134525d4264d8c5965d7eccee5c
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 29235
|
||||
packageName: Contract Killer
|
||||
packageVersion: 1.2
|
||||
assetPath: Assets/Yurowm/Demo/Prefabs/Button.prefab
|
||||
uploadId: 62633
|
||||
1786
Assets/Yurowm/Demo/Prefabs/UI.prefab
Normal file
1786
Assets/Yurowm/Demo/Prefabs/UI.prefab
Normal file
File diff suppressed because it is too large
Load Diff
15
Assets/Yurowm/Demo/Prefabs/UI.prefab.meta
Normal file
15
Assets/Yurowm/Demo/Prefabs/UI.prefab.meta
Normal file
@@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 091ca29298580404d9260e9221539326
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 29235
|
||||
packageName: Contract Killer
|
||||
packageVersion: 1.2
|
||||
assetPath: Assets/Yurowm/Demo/Prefabs/UI.prefab
|
||||
uploadId: 62633
|
||||
8
Assets/Yurowm/Demo/Scripts.meta
Normal file
8
Assets/Yurowm/Demo/Scripts.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 953e44e1fc7fc43dd9010b444d483860
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
71
Assets/Yurowm/Demo/Scripts/Actions.cs
Normal file
71
Assets/Yurowm/Demo/Scripts/Actions.cs
Normal file
@@ -0,0 +1,71 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
[RequireComponent (typeof (Animator))]
|
||||
public class Actions : MonoBehaviour {
|
||||
|
||||
private Animator animator;
|
||||
|
||||
const int countOfDamageAnimations = 3;
|
||||
int lastDamageAnimation = -1;
|
||||
|
||||
void Awake () {
|
||||
animator = GetComponent<Animator> ();
|
||||
}
|
||||
|
||||
public void Stay () {
|
||||
animator.SetBool("Aiming", false);
|
||||
animator.SetFloat ("Speed", 0f);
|
||||
}
|
||||
|
||||
public void Walk () {
|
||||
animator.SetBool("Aiming", false);
|
||||
animator.SetFloat ("Speed", 0.5f);
|
||||
}
|
||||
|
||||
public void Run () {
|
||||
animator.SetBool("Aiming", false);
|
||||
animator.SetFloat ("Speed", 1f);
|
||||
}
|
||||
|
||||
public void Attack () {
|
||||
Aiming ();
|
||||
animator.SetTrigger ("Attack");
|
||||
}
|
||||
|
||||
public void Death () {
|
||||
if (animator.GetCurrentAnimatorStateInfo (0).IsName ("Death"))
|
||||
animator.Play("Idle", 0);
|
||||
else
|
||||
animator.SetTrigger ("Death");
|
||||
}
|
||||
|
||||
public void Damage () {
|
||||
if (animator.GetCurrentAnimatorStateInfo (0).IsName ("Death")) return;
|
||||
int id = Random.Range(0, countOfDamageAnimations);
|
||||
if (countOfDamageAnimations > 1)
|
||||
while (id == lastDamageAnimation)
|
||||
id = Random.Range(0, countOfDamageAnimations);
|
||||
lastDamageAnimation = id;
|
||||
animator.SetInteger ("DamageID", id);
|
||||
animator.SetTrigger ("Damage");
|
||||
}
|
||||
|
||||
public void Jump () {
|
||||
animator.SetBool ("Squat", false);
|
||||
animator.SetFloat ("Speed", 0f);
|
||||
animator.SetBool("Aiming", false);
|
||||
animator.SetTrigger ("Jump");
|
||||
}
|
||||
|
||||
public void Aiming () {
|
||||
animator.SetBool ("Squat", false);
|
||||
animator.SetFloat ("Speed", 0f);
|
||||
animator.SetBool("Aiming", true);
|
||||
}
|
||||
|
||||
public void Sitting () {
|
||||
animator.SetBool ("Squat", !animator.GetBool("Squat"));
|
||||
animator.SetBool("Aiming", false);
|
||||
}
|
||||
}
|
||||
18
Assets/Yurowm/Demo/Scripts/Actions.cs.meta
Normal file
18
Assets/Yurowm/Demo/Scripts/Actions.cs.meta
Normal file
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a85c5e349cb17df4b85883ea088c2f95
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 29235
|
||||
packageName: Contract Killer
|
||||
packageVersion: 1.2
|
||||
assetPath: Assets/Yurowm/Demo/Scripts/Actions.cs
|
||||
uploadId: 62633
|
||||
93
Assets/Yurowm/Demo/Scripts/CharacterPanel.cs
Normal file
93
Assets/Yurowm/Demo/Scripts/CharacterPanel.cs
Normal file
@@ -0,0 +1,93 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
public class CharacterPanel : MonoBehaviour {
|
||||
|
||||
public GameObject character;
|
||||
public Transform weaponsPanel;
|
||||
public Transform actionsPanel;
|
||||
public Transform camerasPanel;
|
||||
public Button buttonPrefab;
|
||||
public Slider motionSpeed;
|
||||
|
||||
Actions actions;
|
||||
PlayerController controller;
|
||||
Camera[] cameras;
|
||||
|
||||
void Start () {
|
||||
Initialize ();
|
||||
}
|
||||
|
||||
void Initialize () {
|
||||
actions = character.GetComponent<Actions> ();
|
||||
controller = character.GetComponent<PlayerController> ();
|
||||
|
||||
foreach (PlayerController.Arsenal a in controller.arsenal)
|
||||
CreateWeaponButton(a.name);
|
||||
|
||||
CreateActionButton("Stay");
|
||||
CreateActionButton("Walk");
|
||||
CreateActionButton("Run");
|
||||
CreateActionButton("Sitting");
|
||||
CreateActionButton("Jump");
|
||||
CreateActionButton("Aiming");
|
||||
CreateActionButton("Attack");
|
||||
CreateActionButton("Damage");
|
||||
CreateActionButton("Death Reset", "Death");
|
||||
|
||||
cameras = GameObject.FindObjectsOfType<Camera> ();
|
||||
var sort = from s in cameras orderby s.name select s;
|
||||
|
||||
foreach (Camera c in sort)
|
||||
CreateCameraButton(c);
|
||||
|
||||
camerasPanel.GetChild (0).GetComponent<Button>().onClick.Invoke();
|
||||
}
|
||||
|
||||
void CreateWeaponButton(string name) {
|
||||
Button button = CreateButton (name, weaponsPanel);
|
||||
button.onClick.AddListener(() => controller.SetArsenal(name));
|
||||
}
|
||||
|
||||
void CreateActionButton(string name) {
|
||||
CreateActionButton(name, name);
|
||||
}
|
||||
|
||||
void CreateActionButton(string name, string message) {
|
||||
Button button = CreateButton (name, actionsPanel);
|
||||
button.onClick.AddListener(() => actions.SendMessage(message, SendMessageOptions.DontRequireReceiver));
|
||||
}
|
||||
|
||||
void CreateCameraButton (Camera c) {
|
||||
Button button = CreateButton (c.name, camerasPanel);
|
||||
button.onClick.AddListener(() => {
|
||||
ShowCamera(c);
|
||||
});
|
||||
}
|
||||
|
||||
Button CreateButton(string name, Transform group) {
|
||||
GameObject obj = (GameObject) Instantiate (buttonPrefab.gameObject);
|
||||
obj.name = name;
|
||||
obj.transform.SetParent(group);
|
||||
obj.transform.localScale = Vector3.one;
|
||||
Text text = obj.transform.GetChild (0).GetComponent<Text> ();
|
||||
text.text = name;
|
||||
return obj.GetComponent<Button> ();
|
||||
}
|
||||
|
||||
void ShowCamera (Camera cam) {
|
||||
foreach (Camera c in cameras)
|
||||
c.gameObject.SetActive(c == cam);
|
||||
}
|
||||
|
||||
void Update() {
|
||||
Time.timeScale = motionSpeed.value;
|
||||
}
|
||||
|
||||
public void OpenPublisherPage() {
|
||||
Application.OpenURL ("https://www.assetstore.unity3d.com/en/#!/publisher/11008");
|
||||
}
|
||||
}
|
||||
18
Assets/Yurowm/Demo/Scripts/CharacterPanel.cs.meta
Normal file
18
Assets/Yurowm/Demo/Scripts/CharacterPanel.cs.meta
Normal file
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: faff4e71621cfa64582e837b57a15288
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 29235
|
||||
packageName: Contract Killer
|
||||
packageVersion: 1.2
|
||||
assetPath: Assets/Yurowm/Demo/Scripts/CharacterPanel.cs
|
||||
uploadId: 62633
|
||||
37
Assets/Yurowm/Demo/Scripts/CharacterViewer.cs
Normal file
37
Assets/Yurowm/Demo/Scripts/CharacterViewer.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class CharacterViewer : MonoBehaviour {
|
||||
|
||||
public Transform cameras;
|
||||
|
||||
Transform targetForCamera;
|
||||
Vector3 deltaPosition;
|
||||
Vector3 lastPosition = Vector3.zero;
|
||||
bool rotating = false;
|
||||
|
||||
void Awake () {
|
||||
targetForCamera = GameObject.Find ("RigSpine3").transform;
|
||||
deltaPosition = cameras.position - targetForCamera.position;
|
||||
}
|
||||
|
||||
void Update () {
|
||||
if (Input.GetMouseButtonDown (0) && Input.mousePosition.x < Screen.width * 0.6f) {
|
||||
lastPosition = Input.mousePosition;
|
||||
rotating = true;
|
||||
}
|
||||
|
||||
if (Input.GetMouseButtonUp(0))
|
||||
rotating = false;
|
||||
|
||||
if (rotating && Input.GetMouseButton(0))
|
||||
transform.Rotate(0, -300f * (Input.mousePosition - lastPosition).x / Screen.width, 0);
|
||||
|
||||
lastPosition = Input.mousePosition;
|
||||
}
|
||||
|
||||
void LateUpdate () {
|
||||
cameras.position += (targetForCamera.position + deltaPosition - cameras.position) * Time.unscaledDeltaTime * 5;
|
||||
}
|
||||
}
|
||||
18
Assets/Yurowm/Demo/Scripts/CharacterViewer.cs.meta
Normal file
18
Assets/Yurowm/Demo/Scripts/CharacterViewer.cs.meta
Normal file
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b68f89f0558dba64592fe494ff82683c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 29235
|
||||
packageName: Contract Killer
|
||||
packageVersion: 1.2
|
||||
assetPath: Assets/Yurowm/Demo/Scripts/CharacterViewer.cs
|
||||
uploadId: 62633
|
||||
51
Assets/Yurowm/Demo/Scripts/PlayerController.cs
Normal file
51
Assets/Yurowm/Demo/Scripts/PlayerController.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
[RequireComponent (typeof (Animator))]
|
||||
public class PlayerController : MonoBehaviour {
|
||||
|
||||
public Transform rightGunBone;
|
||||
public Transform leftGunBone;
|
||||
public Arsenal[] arsenal;
|
||||
|
||||
private Animator animator;
|
||||
|
||||
void Awake() {
|
||||
animator = GetComponent<Animator> ();
|
||||
if (arsenal.Length > 0)
|
||||
SetArsenal (arsenal[0].name);
|
||||
}
|
||||
|
||||
public void SetArsenal(string name) {
|
||||
foreach (Arsenal hand in arsenal) {
|
||||
if (hand.name == name) {
|
||||
if (rightGunBone.childCount > 0)
|
||||
Destroy(rightGunBone.GetChild(0).gameObject);
|
||||
if (leftGunBone.childCount > 0)
|
||||
Destroy(leftGunBone.GetChild(0).gameObject);
|
||||
if (hand.rightGun != null) {
|
||||
GameObject newRightGun = (GameObject) Instantiate(hand.rightGun);
|
||||
newRightGun.transform.parent = rightGunBone;
|
||||
newRightGun.transform.localPosition = Vector3.zero;
|
||||
newRightGun.transform.localRotation = Quaternion.Euler(90, 0, 0);
|
||||
}
|
||||
if (hand.leftGun != null) {
|
||||
GameObject newLeftGun = (GameObject) Instantiate(hand.leftGun);
|
||||
newLeftGun.transform.parent = leftGunBone;
|
||||
newLeftGun.transform.localPosition = Vector3.zero;
|
||||
newLeftGun.transform.localRotation = Quaternion.Euler(90, 0, 0);
|
||||
}
|
||||
animator.runtimeAnimatorController = hand.controller;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public struct Arsenal {
|
||||
public string name;
|
||||
public GameObject rightGun;
|
||||
public GameObject leftGun;
|
||||
public RuntimeAnimatorController controller;
|
||||
}
|
||||
}
|
||||
18
Assets/Yurowm/Demo/Scripts/PlayerController.cs.meta
Normal file
18
Assets/Yurowm/Demo/Scripts/PlayerController.cs.meta
Normal file
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e9aa840a3854ebd47b920d1a5c7d693f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 29235
|
||||
packageName: Contract Killer
|
||||
packageVersion: 1.2
|
||||
assetPath: Assets/Yurowm/Demo/Scripts/PlayerController.cs
|
||||
uploadId: 62633
|
||||
8
Assets/Yurowm/Demo/Textures.meta
Normal file
8
Assets/Yurowm/Demo/Textures.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5b40d61c0285341e6b6121b718ad1005
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Yurowm/Demo/Textures/DarkSpot.JPG
Normal file
BIN
Assets/Yurowm/Demo/Textures/DarkSpot.JPG
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
150
Assets/Yurowm/Demo/Textures/DarkSpot.JPG.meta
Normal file
150
Assets/Yurowm/Demo/Textures/DarkSpot.JPG.meta
Normal file
@@ -0,0 +1,150 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cf1ecb6f7e8d0e842856ac0bc3d02b7f
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: -1
|
||||
maxTextureSize: 1024
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 1
|
||||
swizzle: 50462976
|
||||
cookieLightType: 1
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 1024
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 1024
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 1024
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: iOS
|
||||
maxTextureSize: 1024
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 29235
|
||||
packageName: Contract Killer
|
||||
packageVersion: 1.2
|
||||
assetPath: Assets/Yurowm/Demo/Textures/DarkSpot.JPG
|
||||
uploadId: 62633
|
||||
Reference in New Issue
Block a user