Some minor Examples restructuring and finally added a .GitIgnore #FaceSlap
parent
c3025ee11b
commit
3daac5e970
|
@ -0,0 +1,34 @@
|
|||
/[Ll]ibrary/
|
||||
/[Tt]emp/
|
||||
/[Oo]bj/
|
||||
/[Bb]uild/
|
||||
/[Bb]uilds/
|
||||
/[Ee]xport
|
||||
/Assets/AssetStoreTools*
|
||||
|
||||
# Autogenerated VS/MD/Consulo solution and project files
|
||||
ExportedObj/
|
||||
.consulo/
|
||||
*.csproj
|
||||
*.unityproj
|
||||
*.sln
|
||||
*.suo
|
||||
*.tmp
|
||||
*.user
|
||||
*.userprefs
|
||||
*.pidb
|
||||
*.booproj
|
||||
*.svd
|
||||
|
||||
# Unity3D generated meta files
|
||||
*.pidb.meta
|
||||
|
||||
# Mac files
|
||||
*.DS_Store
|
||||
|
||||
# Unity3D Generated File On Crash Reports
|
||||
sysinfo.txt
|
||||
|
||||
# Builds
|
||||
*.apk
|
||||
*.unitypackage
|
14
.hgignore
14
.hgignore
|
@ -1,14 +0,0 @@
|
|||
syntax: glob
|
||||
Output
|
||||
Library
|
||||
Temp
|
||||
*.csproj
|
||||
*.pidb
|
||||
*.unityproj
|
||||
*.sln
|
||||
*.userprefs
|
||||
*.suo
|
||||
thumbs.db
|
||||
obj
|
||||
bin
|
||||
.JustCode
|
7
.hgtags
7
.hgtags
|
@ -1,7 +0,0 @@
|
|||
97d8d14086eef83ec0a9ebfe62b6ced06b9e7fc9 V1.0.0
|
||||
628716da6e2e4f0418a22ab6e6de6078812f2ff9 V1.0.0.1
|
||||
4e0c023e1e1362d4d313e78d8c82e7947f3e0b0c V1.0.0.2
|
||||
82a1ba231e1e1743f7d09edfc8800cb8b798bdda V1.0.0.3
|
||||
83852cf05189ce568385b8886252c64a2254562c Update 1.2
|
||||
f49641c43205509170544841a96d20caa54a1b34 1.2.0.2
|
||||
9b6be359978d9a2de12380fd675a2faeb347b2fa 1.2.0.3
|
|
@ -1070,6 +1070,7 @@ GameObject:
|
|||
- component: {fileID: 2006058788}
|
||||
- component: {fileID: 2006058787}
|
||||
- component: {fileID: 2006058786}
|
||||
- component: {fileID: 2006058790}
|
||||
m_Layer: 5
|
||||
m_Name: Horizontal Scroll Snap
|
||||
m_TagString: Untagged
|
||||
|
@ -1134,7 +1135,18 @@ MonoBehaviour:
|
|||
Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_OnSelectionChangeEndEvent:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 2006058790}
|
||||
m_MethodName: Play
|
||||
m_Mode: 0
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
m_TypeName: UnityEngine.UI.Extensions.ScrollSnapBase+SelectionChangeEndEvent,
|
||||
Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
--- !u!114 &2006058787
|
||||
|
@ -1201,6 +1213,23 @@ CanvasRenderer:
|
|||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 2006058784}
|
||||
--- !u!95 &2006058790
|
||||
Animator:
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 2006058784}
|
||||
m_Enabled: 1
|
||||
m_Avatar: {fileID: 0}
|
||||
m_Controller: {fileID: 9100000, guid: 01b7a44c798a89c40a32385b0fd06de6, type: 2}
|
||||
m_CullingMode: 0
|
||||
m_UpdateMode: 0
|
||||
m_ApplyRootMotion: 0
|
||||
m_LinearVelocityBlending: 0
|
||||
m_WarningMessage:
|
||||
m_HasTransformHierarchy: 1
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
--- !u!1 &2029612673
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!91 &9100000
|
||||
AnimatorController:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: Horizontal Scroll Snap
|
||||
serializedVersion: 5
|
||||
m_AnimatorParameters: []
|
||||
m_AnimatorLayers:
|
||||
- serializedVersion: 5
|
||||
m_Name: Base Layer
|
||||
m_StateMachine: {fileID: 1107717795084589948}
|
||||
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!1102 &1102164350708718754
|
||||
AnimatorState:
|
||||
serializedVersion: 5
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: ItemAnimationClip
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions: []
|
||||
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_Motion: {fileID: 7400000, guid: 0749a4928b1d06d4faccd624c75bcdb2, type: 2}
|
||||
m_Tag:
|
||||
m_SpeedParameter:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
--- !u!1107 &1107717795084589948
|
||||
AnimatorStateMachine:
|
||||
serializedVersion: 5
|
||||
m_ObjectHideFlags: 1
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: Base Layer
|
||||
m_ChildStates:
|
||||
- serializedVersion: 1
|
||||
m_State: {fileID: 1102164350708718754}
|
||||
m_Position: {x: 252, y: 60, 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: 1102164350708718754}
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 01b7a44c798a89c40a32385b0fd06de6
|
||||
timeCreated: 1499888222
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 9100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,169 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!74 &7400000
|
||||
AnimationClip:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: ItemAnimationClip
|
||||
serializedVersion: 6
|
||||
m_Legacy: 0
|
||||
m_Compressed: 0
|
||||
m_UseHighQualityCurve: 1
|
||||
m_RotationCurves: []
|
||||
m_CompressedRotationCurves: []
|
||||
m_EulerCurves: []
|
||||
m_PositionCurves: []
|
||||
m_ScaleCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: {x: 1, y: 1, z: 1}
|
||||
inSlope: {x: 0, y: 0, z: 0}
|
||||
outSlope: {x: 0, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: {x: 1.5, y: 1.5, z: 1.5}
|
||||
inSlope: {x: 0, y: 0, z: 0}
|
||||
outSlope: {x: 0, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
- serializedVersion: 2
|
||||
time: 2
|
||||
value: {x: 1, y: 1, z: 1}
|
||||
inSlope: {x: 0, y: 0, z: 0}
|
||||
outSlope: {x: 0, y: 0, z: 0}
|
||||
tangentMode: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
path: Content/Page_01/Page_01_Image
|
||||
m_FloatCurves: []
|
||||
m_PPtrCurves: []
|
||||
m_SampleRate: 12
|
||||
m_WrapMode: 0
|
||||
m_Bounds:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 0, y: 0, z: 0}
|
||||
m_ClipBindingConstant:
|
||||
genericBindings:
|
||||
- serializedVersion: 2
|
||||
path: 896827626
|
||||
attribute: 3
|
||||
script: {fileID: 0}
|
||||
typeID: 4
|
||||
customType: 0
|
||||
isPPtrCurve: 0
|
||||
pptrCurveMapping: []
|
||||
m_AnimationClipSettings:
|
||||
serializedVersion: 2
|
||||
m_AdditiveReferencePoseClip: {fileID: 0}
|
||||
m_AdditiveReferencePoseTime: 0
|
||||
m_StartTime: 0
|
||||
m_StopTime: 2
|
||||
m_OrientationOffsetY: 0
|
||||
m_Level: 0
|
||||
m_CycleOffset: 0
|
||||
m_HasAdditiveReferencePose: 0
|
||||
m_LoopTime: 0
|
||||
m_LoopBlend: 0
|
||||
m_LoopBlendOrientation: 0
|
||||
m_LoopBlendPositionY: 0
|
||||
m_LoopBlendPositionXZ: 0
|
||||
m_KeepOriginalOrientation: 0
|
||||
m_KeepOriginalPositionY: 1
|
||||
m_KeepOriginalPositionXZ: 0
|
||||
m_HeightFromFeet: 0
|
||||
m_Mirror: 0
|
||||
m_EditorCurves:
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: 1.5
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 2
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalScale.x
|
||||
path: Content/Page_01/Page_01_Image
|
||||
classID: 224
|
||||
script: {fileID: 0}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: 1.5
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 2
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalScale.y
|
||||
path: Content/Page_01/Page_01_Image
|
||||
classID: 224
|
||||
script: {fileID: 0}
|
||||
- curve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 2
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 1
|
||||
value: 1.5
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
- serializedVersion: 2
|
||||
time: 2
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 136
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
attribute: m_LocalScale.z
|
||||
path: Content/Page_01/Page_01_Image
|
||||
classID: 224
|
||||
script: {fileID: 0}
|
||||
m_EulerEditorCurves: []
|
||||
m_HasGenericRootTransform: 0
|
||||
m_HasMotionFloatCurves: 0
|
||||
m_GenerateMotionCurves: 0
|
||||
m_Events: []
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0749a4928b1d06d4faccd624c75bcdb2
|
||||
timeCreated: 1499888222
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 7400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 51472598576671e4891516bfafc2459f
|
||||
folderAsset: yes
|
||||
timeCreated: 1500103716
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1,8 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9b8d590979bc3264ab9a7df11a0e8c3c
|
||||
timeCreated: 1446061891
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
fileFormatVersion: 2
|
||||
guid: 9b8d590979bc3264ab9a7df11a0e8c3c
|
||||
timeCreated: 1446061891
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c717c8d5ba8118f4a83df7b7a702395f
|
||||
folderAsset: yes
|
||||
timeCreated: 1500103765
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1,95 +1,95 @@
|
|||
/// Original Credit Korindian
|
||||
/// Sourced from - http://forum.unity3d.com/threads/rts-style-drag-selection-box.265739/
|
||||
/// Updated Credit BenZed
|
||||
/// Sourced from - http://forum.unity3d.com/threads/color-picker.267043/
|
||||
|
||||
|
||||
namespace UnityEngine.UI.Extensions
|
||||
{
|
||||
public class ExampleSelectable : MonoBehaviour, IBoxSelectable
|
||||
{
|
||||
|
||||
#region Implemented members of IBoxSelectable
|
||||
bool _selected = false;
|
||||
public bool selected
|
||||
{
|
||||
get
|
||||
{
|
||||
return _selected;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
_selected = value;
|
||||
}
|
||||
}
|
||||
|
||||
bool _preSelected = false;
|
||||
public bool preSelected
|
||||
{
|
||||
get
|
||||
{
|
||||
return _preSelected;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
_preSelected = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
//We want the test object to be either a UI element, a 2D element or a 3D element, so we'll get the appropriate components
|
||||
SpriteRenderer spriteRenderer;
|
||||
Image image;
|
||||
Text text;
|
||||
|
||||
void Start()
|
||||
{
|
||||
spriteRenderer = transform.GetComponent<SpriteRenderer>();
|
||||
image = transform.GetComponent<Image>();
|
||||
text = transform.GetComponent<Text>();
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
|
||||
//What the game object does with the knowledge that it is selected is entirely up to it.
|
||||
//In this case we're just going to change the color.
|
||||
|
||||
//White if deselected.
|
||||
Color color = Color.white;
|
||||
|
||||
if (preSelected)
|
||||
{
|
||||
//Yellow if preselected
|
||||
color = Color.yellow;
|
||||
}
|
||||
if (selected)
|
||||
{
|
||||
//And green if selected.
|
||||
color = Color.green;
|
||||
}
|
||||
|
||||
//Set the color depending on what the game object has.
|
||||
if (spriteRenderer)
|
||||
{
|
||||
spriteRenderer.color = color;
|
||||
}
|
||||
else if (text)
|
||||
{
|
||||
text.color = color;
|
||||
}
|
||||
else if (image)
|
||||
{
|
||||
image.color = color;
|
||||
}
|
||||
else if (GetComponent<UnityEngine.Renderer>())
|
||||
{
|
||||
GetComponent<UnityEngine.Renderer>().material.color = color;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
/// Original Credit Korindian
|
||||
/// Sourced from - http://forum.unity3d.com/threads/rts-style-drag-selection-box.265739/
|
||||
/// Updated Credit BenZed
|
||||
/// Sourced from - http://forum.unity3d.com/threads/color-picker.267043/
|
||||
|
||||
|
||||
namespace UnityEngine.UI.Extensions
|
||||
{
|
||||
public class ExampleSelectable : MonoBehaviour, IBoxSelectable
|
||||
{
|
||||
|
||||
#region Implemented members of IBoxSelectable
|
||||
bool _selected = false;
|
||||
public bool selected
|
||||
{
|
||||
get
|
||||
{
|
||||
return _selected;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
_selected = value;
|
||||
}
|
||||
}
|
||||
|
||||
bool _preSelected = false;
|
||||
public bool preSelected
|
||||
{
|
||||
get
|
||||
{
|
||||
return _preSelected;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
_preSelected = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
//We want the test object to be either a UI element, a 2D element or a 3D element, so we'll get the appropriate components
|
||||
SpriteRenderer spriteRenderer;
|
||||
Image image;
|
||||
Text text;
|
||||
|
||||
void Start()
|
||||
{
|
||||
spriteRenderer = transform.GetComponent<SpriteRenderer>();
|
||||
image = transform.GetComponent<Image>();
|
||||
text = transform.GetComponent<Text>();
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
|
||||
//What the game object does with the knowledge that it is selected is entirely up to it.
|
||||
//In this case we're just going to change the color.
|
||||
|
||||
//White if deselected.
|
||||
Color color = Color.white;
|
||||
|
||||
if (preSelected)
|
||||
{
|
||||
//Yellow if preselected
|
||||
color = Color.yellow;
|
||||
}
|
||||
if (selected)
|
||||
{
|
||||
//And green if selected.
|
||||
color = Color.green;
|
||||
}
|
||||
|
||||
//Set the color depending on what the game object has.
|
||||
if (spriteRenderer)
|
||||
{
|
||||
spriteRenderer.color = color;
|
||||
}
|
||||
else if (text)
|
||||
{
|
||||
text.color = color;
|
||||
}
|
||||
else if (image)
|
||||
{
|
||||
image.color = color;
|
||||
}
|
||||
else if (GetComponent<UnityEngine.Renderer>())
|
||||
{
|
||||
GetComponent<UnityEngine.Renderer>().material.color = color;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue