From 0cd9aab9f5bba7bd90a7538d046e718ee506d739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Pell=C3=A9?= Date: Tue, 6 Jan 2015 15:11:35 +0100 Subject: [PATCH] Modification du chat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit le chat possède maintenant 5 état (dans l'animator de tchat_complet). -un état de repos qui se lance via une petite animation. -un état haut, lorsque que le texte devient trop long. le nb de lignes est encore mal detecter. -un état très long, lordque la limite de texte (150 pr l'instant) est proche: il affiche le nombre de carac restant (la fonction bug pour l'instant). -un état 'se baisser', le chat revient dans sa position initiale si il était haut. -un état 'timer', ou un délai (15 sec pour l'instant) est déclenché. Il faudra ajouter un texte avec les secodnes restantes. en outre, il reste a gérer l'activation/desactivation du tchat, ainsi que la barre de scroll, et autres bug eventuels. --- .../anim_clips_ui/tchat_complet.controller | 190 +++++++- .../animation/anim_clips_ui/tchat_dispo.anim | 446 ++++++++++++++++++ .../anim_clips_ui/tchat_dispo.anim.meta | 4 + .../animation/anim_clips_ui/tchat_reset.anim | 402 ++++++++++++++++ .../anim_clips_ui/tchat_reset.anim.meta | 4 + Assets/animation/anim_clips_ui/tchat_up.anim | 296 +++++++++--- Assets/scene.unity | 198 ++++++-- Assets/scripts/OnClickedMoveCamera.cs | 1 + Assets/scripts/tchat_anim.cs | 79 +++- 9 files changed, 1479 insertions(+), 141 deletions(-) create mode 100644 Assets/animation/anim_clips_ui/tchat_dispo.anim create mode 100644 Assets/animation/anim_clips_ui/tchat_dispo.anim.meta create mode 100644 Assets/animation/anim_clips_ui/tchat_reset.anim create mode 100644 Assets/animation/anim_clips_ui/tchat_reset.anim.meta diff --git a/Assets/animation/anim_clips_ui/tchat_complet.controller b/Assets/animation/anim_clips_ui/tchat_complet.controller index a9d253b..49f77d6 100644 --- a/Assets/animation/anim_clips_ui/tchat_complet.controller +++ b/Assets/animation/anim_clips_ui/tchat_complet.controller @@ -8,8 +8,8 @@ AnimatorController: m_Name: tchat_complet serializedVersion: 2 m_AnimatorParameters: - - m_Name: etat_tchat - m_Type: 4 + - m_Name: etat_chat + m_Type: 3 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 @@ -38,15 +38,15 @@ Transition: m_TransitionDuration: .576923072 m_TransitionOffset: 0 m_Conditions: - - m_ConditionMode: 1 - m_ConditionEvent: etat_tchat - m_EventTreshold: 0 + - m_ConditionMode: 6 + m_ConditionEvent: etat_chat + m_EventTreshold: 1 m_ExitTime: .423076928 m_Atomic: 1 m_Solo: 0 m_Mute: 0 m_CanTransitionToSelf: 0 ---- !u!1101 &110133210 +--- !u!1101 &110117131 Transition: serializedVersion: 2 m_ObjectHideFlags: 3 @@ -54,13 +54,113 @@ Transition: m_PrefabInternal: {fileID: 0} m_Name: m_SrcState: {fileID: 110299434} - m_DstState: {fileID: 110200000} + m_DstState: {fileID: 110260290} m_TransitionDuration: .576923072 m_TransitionOffset: 0 m_Conditions: - - m_ConditionMode: 2 - m_ConditionEvent: etat_tchat + - m_ConditionMode: 6 + m_ConditionEvent: etat_chat + m_EventTreshold: 3 + m_ExitTime: .423076928 + m_Atomic: 1 + m_Solo: 0 + m_Mute: 0 + m_CanTransitionToSelf: 0 +--- !u!1101 &110129462 +Transition: + serializedVersion: 2 + m_ObjectHideFlags: 3 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: + m_SrcState: {fileID: 110250990} + m_DstState: {fileID: 110200000} + m_TransitionDuration: 0 + m_TransitionOffset: 0 + m_Conditions: + - m_ConditionMode: 5 + m_ConditionEvent: etat_chat m_EventTreshold: 0 + m_ExitTime: .991933286 + m_Atomic: 0 + m_Solo: 0 + m_Mute: 0 + m_CanTransitionToSelf: 0 +--- !u!1101 &110153044 +Transition: + serializedVersion: 2 + m_ObjectHideFlags: 3 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: + m_SrcState: {fileID: 110260290} + m_DstState: {fileID: 110250990} + m_TransitionDuration: .100000001 + m_TransitionOffset: 0 + m_Conditions: + - m_ConditionMode: 5 + m_ConditionEvent: etat_chat + m_EventTreshold: 4 + m_ExitTime: .899999976 + m_Atomic: 1 + m_Solo: 0 + m_Mute: 0 + m_CanTransitionToSelf: 0 +--- !u!1101 &110153767 +Transition: + serializedVersion: 2 + m_ObjectHideFlags: 3 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: + m_SrcState: {fileID: 110200000} + m_DstState: {fileID: 110250990} + m_TransitionDuration: .576923072 + m_TransitionOffset: 0 + m_Conditions: + - m_ConditionMode: 6 + m_ConditionEvent: etat_chat + m_EventTreshold: 5 + m_ExitTime: .423076928 + m_Atomic: 1 + m_Solo: 0 + m_Mute: 0 + m_CanTransitionToSelf: 0 +--- !u!1101 &110166587 +Transition: + serializedVersion: 2 + m_ObjectHideFlags: 3 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: + m_SrcState: {fileID: 110219388} + m_DstState: {fileID: 110260290} + m_TransitionDuration: .100000001 + m_TransitionOffset: 0 + m_Conditions: + - m_ConditionMode: 6 + m_ConditionEvent: etat_chat + m_EventTreshold: 3 + m_ExitTime: .899999976 + m_Atomic: 1 + m_Solo: 0 + m_Mute: 0 + m_CanTransitionToSelf: 0 +--- !u!1101 &110170679 +Transition: + serializedVersion: 2 + m_ObjectHideFlags: 3 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: + m_SrcState: {fileID: 110299434} + m_DstState: {fileID: 110219388} + m_TransitionDuration: .576923072 + m_TransitionOffset: 0 + m_Conditions: + - m_ConditionMode: 6 + m_ConditionEvent: etat_chat + m_EventTreshold: 2 m_ExitTime: .423076928 m_Atomic: 1 m_Solo: 0 @@ -71,13 +171,58 @@ State: m_ObjectHideFlags: 3 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - m_Name: tchat_up + m_Name: chat_down + m_Speed: 1 + m_CycleOffset: 0 + m_Motions: + - {fileID: 7400000, guid: da6d6218922a09742b52fdf4e3a19dcf, type: 2} + m_ParentStateMachine: {fileID: 110700000} + m_Position: {x: 636, y: 144, z: 0} + m_IKOnFeet: 0 + m_Mirror: 0 + m_Tag: +--- !u!1102 &110219388 +State: + m_ObjectHideFlags: 3 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: chat_long + m_Speed: 1 + m_CycleOffset: 0 + m_Motions: + - {fileID: 0} + m_ParentStateMachine: {fileID: 110700000} + m_Position: {x: 288, y: -120, z: 0} + m_IKOnFeet: 0 + m_Mirror: 0 + m_Tag: +--- !u!1102 &110250990 +State: + m_ObjectHideFlags: 3 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: timer + m_Speed: 1 + m_CycleOffset: 0 + m_Motions: + - {fileID: 7400000, guid: d0a00298246e4054ca9ad4a6b5c5dd94, type: 2} + m_ParentStateMachine: {fileID: 110700000} + m_Position: {x: 468, y: 264, z: 0} + m_IKOnFeet: 0 + m_Mirror: 0 + m_Tag: +--- !u!1102 &110260290 +State: + m_ObjectHideFlags: 3 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: going_down m_Speed: 1 m_CycleOffset: 0 m_Motions: - {fileID: 7400000, guid: cf807dffd8aae4e49a1d5f40102f2f21, type: 2} m_ParentStateMachine: {fileID: 110700000} - m_Position: {x: 156, y: -180, z: 0} + m_Position: {x: 288, y: 144, z: 0} m_IKOnFeet: 0 m_Mirror: 0 m_Tag: @@ -86,13 +231,13 @@ State: m_ObjectHideFlags: 3 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - m_Name: tchat_down + m_Name: chat_up m_Speed: -1 m_CycleOffset: 0 m_Motions: - {fileID: 7400000, guid: cf807dffd8aae4e49a1d5f40102f2f21, type: 2} m_ParentStateMachine: {fileID: 110700000} - m_Position: {x: 156, y: -48, z: 0} + m_Position: {x: 636, y: -120, z: 0} m_IKOnFeet: 0 m_Mirror: 0 m_Tag: @@ -107,6 +252,9 @@ StateMachine: m_States: - {fileID: 110200000} - {fileID: 110299434} + - {fileID: 110219388} + - {fileID: 110260290} + - {fileID: 110250990} m_ChildStateMachine: [] m_ChildStateMachinePosition: [] m_OrderedTransitions: @@ -114,10 +262,24 @@ StateMachine: first: {fileID: 110200000} second: - {fileID: 110100000} + - {fileID: 110153767} data: first: {fileID: 110299434} second: - - {fileID: 110133210} + - {fileID: 110170679} + - {fileID: 110117131} + data: + first: {fileID: 110219388} + second: + - {fileID: 110166587} + data: + first: {fileID: 110260290} + second: + - {fileID: 110153044} + data: + first: {fileID: 110250990} + second: + - {fileID: 110129462} m_MotionSetCount: 1 m_AnyStatePosition: {x: -168, y: -12, z: 0} m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} diff --git a/Assets/animation/anim_clips_ui/tchat_dispo.anim b/Assets/animation/anim_clips_ui/tchat_dispo.anim new file mode 100644 index 0000000..b57502e --- /dev/null +++ b/Assets/animation/anim_clips_ui/tchat_dispo.anim @@ -0,0 +1,446 @@ +%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: tchat_dispo + serializedVersion: 4 + m_AnimationType: 2 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: -722.307678 + outSlope: -722.307678 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_SizeDelta.y + path: + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 7 + inSlope: 345.692322 + outSlope: 345.692322 + tangentMode: 21 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_AnchoredPosition.y + path: "tchat_entr\xE9e" + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 72 + inSlope: -345.692322 + outSlope: -345.692322 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_SizeDelta.y + path: "tchat_entr\xE9e" + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: -215.900528 + inSlope: 88.9999924 + outSlope: .00801086426 + tangentMode: 21 + - time: .0666666701 + value: -215.899994 + inSlope: .00801086426 + outSlope: 0 + tangentMode: 5 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_AnchoredPosition.x + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 45.647522 + inSlope: 0 + outSlope: -.712852418 + tangentMode: 21 + - time: .0666666701 + value: 45.5999985 + inSlope: -.712852418 + outSlope: 0 + tangentMode: 5 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_AnchoredPosition.y + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 70 + inSlope: 0 + outSlope: 0 + tangentMode: 21 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_SizeDelta.y + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 305.200012 + inSlope: 177.999878 + outSlope: 574.499817 + tangentMode: 21 + - time: .0666666701 + value: 343.5 + inSlope: 574.499817 + outSlope: 0 + tangentMode: 5 + - time: 15 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 1 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_SizeDelta.x + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 5.58793545e-09 + inSlope: 0 + outSlope: 0 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_Pivot.x + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: .55210799 + inSlope: 0 + outSlope: 0 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_Pivot.y + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 10 + - time: 14.5666666 + value: 1 + inSlope: -1.15384603 + outSlope: -1.15384603 + tangentMode: 10 + - time: 15 + value: 0 + inSlope: -2.30769205 + outSlope: -2.30769205 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_Color.a + path: Image + classID: 114 + script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - path: 0 + attribute: 38095219 + script: {fileID: 0} + classID: 224 + customType: 0 + isPPtrCurve: 0 + - path: 678305014 + attribute: 538195251 + script: {fileID: 0} + classID: 224 + customType: 0 + isPPtrCurve: 0 + - path: 678305014 + attribute: 38095219 + script: {fileID: 0} + classID: 224 + customType: 0 + isPPtrCurve: 0 + - path: 83635035 + attribute: 1460864421 + script: {fileID: 0} + classID: 224 + customType: 0 + isPPtrCurve: 0 + - path: 83635035 + attribute: 538195251 + script: {fileID: 0} + classID: 224 + customType: 0 + isPPtrCurve: 0 + - path: 83635035 + attribute: 1967290853 + script: {fileID: 0} + classID: 224 + customType: 0 + isPPtrCurve: 0 + - path: 83635035 + attribute: 304273561 + script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + classID: 114 + customType: 0 + isPPtrCurve: 0 + - path: 83635035 + attribute: 38095219 + script: {fileID: 0} + classID: 224 + customType: 0 + isPPtrCurve: 0 + - path: 83635035 + attribute: 3640387206 + script: {fileID: 0} + classID: 224 + customType: 0 + isPPtrCurve: 0 + - path: 83635035 + attribute: 2952582672 + script: {fileID: 0} + classID: 224 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_StartTime: 0 + m_StopTime: 15 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_LoopTime: 1 + 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: + - time: 0 + value: 0 + inSlope: -722.307678 + outSlope: -722.307678 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_SizeDelta.y + path: + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 7 + inSlope: 345.692322 + outSlope: 345.692322 + tangentMode: 21 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_AnchoredPosition.y + path: "tchat_entr\xE9e" + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 72 + inSlope: -345.692322 + outSlope: -345.692322 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_SizeDelta.y + path: "tchat_entr\xE9e" + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: -215.900528 + inSlope: 88.9999924 + outSlope: .00801086426 + tangentMode: 21 + - time: .0666666701 + value: -215.899994 + inSlope: .00801086426 + outSlope: 0 + tangentMode: 5 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_AnchoredPosition.x + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 45.647522 + inSlope: 0 + outSlope: -.712852418 + tangentMode: 21 + - time: .0666666701 + value: 45.5999985 + inSlope: -.712852418 + outSlope: 0 + tangentMode: 5 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_AnchoredPosition.y + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 70 + inSlope: 0 + outSlope: 0 + tangentMode: 21 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_SizeDelta.y + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 305.200012 + inSlope: 177.999878 + outSlope: 574.499817 + tangentMode: 21 + - time: .0666666701 + value: 343.5 + inSlope: 574.499817 + outSlope: 0 + tangentMode: 5 + - time: 15 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 1 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_SizeDelta.x + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 5.58793545e-09 + inSlope: 0 + outSlope: 0 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_Pivot.x + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: .55210799 + inSlope: 0 + outSlope: 0 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_Pivot.y + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 10 + - time: 14.5666666 + value: 1 + inSlope: -1.15384603 + outSlope: -1.15384603 + tangentMode: 10 + - time: 15 + value: 0 + inSlope: -2.30769205 + outSlope: -2.30769205 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_Color.a + path: Image + classID: 114 + script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_EulerEditorCurves: [] + m_Events: [] diff --git a/Assets/animation/anim_clips_ui/tchat_dispo.anim.meta b/Assets/animation/anim_clips_ui/tchat_dispo.anim.meta new file mode 100644 index 0000000..ba8c2b1 --- /dev/null +++ b/Assets/animation/anim_clips_ui/tchat_dispo.anim.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: d0a00298246e4054ca9ad4a6b5c5dd94 +NativeFormatImporter: + userData: diff --git a/Assets/animation/anim_clips_ui/tchat_reset.anim b/Assets/animation/anim_clips_ui/tchat_reset.anim new file mode 100644 index 0000000..5cc7cab --- /dev/null +++ b/Assets/animation/anim_clips_ui/tchat_reset.anim @@ -0,0 +1,402 @@ +%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: tchat_reset + serializedVersion: 4 + m_AnimationType: 2 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: -722.307678 + outSlope: -722.307678 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_SizeDelta.y + path: + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: -215.899994 + inSlope: .00801086426 + outSlope: 0 + tangentMode: 5 + - time: .633333325 + value: -215.899994 + inSlope: 0 + outSlope: 0 + tangentMode: 1 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_AnchoredPosition.x + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 45.5999985 + inSlope: -.712852418 + outSlope: 0 + tangentMode: 5 + - time: .616666675 + value: 43.0639992 + inSlope: 0 + outSlope: 0 + tangentMode: 1 + - time: .633333325 + value: -34.9360008 + inSlope: 0 + outSlope: 0 + tangentMode: 1 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_AnchoredPosition.y + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 5.58793545e-09 + inSlope: 0 + outSlope: 0 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_Pivot.x + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: .55210799 + inSlope: 0 + outSlope: 0 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_Pivot.y + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 343.5 + inSlope: 574.499817 + outSlope: 0 + tangentMode: 5 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_SizeDelta.x + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 3.40106964 + outSlope: 3.40106964 + tangentMode: 10 + - time: .183333337 + value: .623529434 + inSlope: .98107779 + outSlope: .98107779 + tangentMode: 10 + - time: .616666675 + value: 0 + inSlope: -1.43891406 + outSlope: -1.43891406 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_Color.a + path: Image + classID: 114 + script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 7 + inSlope: 345.692322 + outSlope: 345.692322 + tangentMode: 21 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_AnchoredPosition.y + path: "tchat_entr\xE9e" + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 72 + inSlope: -345.692322 + outSlope: -345.692322 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_SizeDelta.y + path: "tchat_entr\xE9e" + classID: 224 + script: {fileID: 0} + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - path: 0 + attribute: 38095219 + script: {fileID: 0} + classID: 224 + customType: 0 + isPPtrCurve: 0 + - path: 83635035 + attribute: 1460864421 + script: {fileID: 0} + classID: 224 + customType: 0 + isPPtrCurve: 0 + - path: 83635035 + attribute: 538195251 + script: {fileID: 0} + classID: 224 + customType: 0 + isPPtrCurve: 0 + - path: 83635035 + attribute: 1967290853 + script: {fileID: 0} + classID: 224 + customType: 0 + isPPtrCurve: 0 + - path: 83635035 + attribute: 304273561 + script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + classID: 114 + customType: 0 + isPPtrCurve: 0 + - path: 678305014 + attribute: 538195251 + script: {fileID: 0} + classID: 224 + customType: 0 + isPPtrCurve: 0 + - path: 678305014 + attribute: 38095219 + script: {fileID: 0} + classID: 224 + customType: 0 + isPPtrCurve: 0 + - path: 83635035 + attribute: 3640387206 + script: {fileID: 0} + classID: 224 + customType: 0 + isPPtrCurve: 0 + - path: 83635035 + attribute: 2952582672 + script: {fileID: 0} + classID: 224 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_StartTime: 0 + m_StopTime: .633333325 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 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: + - time: 0 + value: 0 + inSlope: -722.307678 + outSlope: -722.307678 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_SizeDelta.y + path: + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: -215.899994 + inSlope: .00801086426 + outSlope: 0 + tangentMode: 5 + - time: .633333325 + value: -215.899994 + inSlope: 0 + outSlope: 0 + tangentMode: 1 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_AnchoredPosition.x + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 45.5999985 + inSlope: -.712852418 + outSlope: 0 + tangentMode: 5 + - time: .616666675 + value: 43.0639992 + inSlope: 0 + outSlope: 0 + tangentMode: 1 + - time: .633333325 + value: -34.9360008 + inSlope: 0 + outSlope: 0 + tangentMode: 1 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_AnchoredPosition.y + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 5.58793545e-09 + inSlope: 0 + outSlope: 0 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_Pivot.x + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: .55210799 + inSlope: 0 + outSlope: 0 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_Pivot.y + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 343.5 + inSlope: 574.499817 + outSlope: 0 + tangentMode: 5 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_SizeDelta.x + path: Image + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 3.40106964 + outSlope: 3.40106964 + tangentMode: 10 + - time: .183333337 + value: .623529434 + inSlope: .98107779 + outSlope: .98107779 + tangentMode: 10 + - time: .616666675 + value: 0 + inSlope: -1.43891406 + outSlope: -1.43891406 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_Color.a + path: Image + classID: 114 + script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 7 + inSlope: 345.692322 + outSlope: 345.692322 + tangentMode: 21 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_AnchoredPosition.y + path: "tchat_entr\xE9e" + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 72 + inSlope: -345.692322 + outSlope: -345.692322 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_SizeDelta.y + path: "tchat_entr\xE9e" + classID: 224 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_Events: [] diff --git a/Assets/animation/anim_clips_ui/tchat_reset.anim.meta b/Assets/animation/anim_clips_ui/tchat_reset.anim.meta new file mode 100644 index 0000000..9206a1a --- /dev/null +++ b/Assets/animation/anim_clips_ui/tchat_reset.anim.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: da6d6218922a09742b52fdf4e3a19dcf +NativeFormatImporter: + userData: diff --git a/Assets/animation/anim_clips_ui/tchat_up.anim b/Assets/animation/anim_clips_ui/tchat_up.anim index e468c89..0d090bc 100644 --- a/Assets/animation/anim_clips_ui/tchat_up.anim +++ b/Assets/animation/anim_clips_ui/tchat_up.anim @@ -38,14 +38,14 @@ AnimationClip: serializedVersion: 2 m_Curve: - time: 0 - value: -142 - inSlope: 343.846161 - outSlope: 343.846161 + value: -142.800003 + inSlope: 345.692322 + outSlope: 345.692322 tangentMode: 10 - time: .433333337 value: 7 - inSlope: 343.846161 - outSlope: 343.846161 + inSlope: 345.692322 + outSlope: 345.692322 tangentMode: 10 m_PreInfinity: 2 m_PostInfinity: 2 @@ -57,14 +57,14 @@ AnimationClip: serializedVersion: 2 m_Curve: - time: 0 - value: 221 - inSlope: -343.846161 - outSlope: -343.846161 + value: 221.800003 + inSlope: -345.692322 + outSlope: -345.692322 tangentMode: 10 - time: .433333337 value: 72 - inSlope: -343.846161 - outSlope: -343.846161 + inSlope: -345.692322 + outSlope: -345.692322 tangentMode: 10 m_PreInfinity: 2 m_PostInfinity: 2 @@ -76,39 +76,105 @@ AnimationClip: serializedVersion: 2 m_Curve: - time: 0 - value: 293.045593 - inSlope: -424.229523 - outSlope: -424.229523 - tangentMode: 10 - - time: .433333337 - value: 109.212807 - inSlope: -424.229523 - outSlope: -424.229523 + value: -216 + inSlope: 0 + outSlope: 0 tangentMode: 10 m_PreInfinity: 2 m_PostInfinity: 2 - attribute: m_Size.y - path: - classID: 61 + attribute: m_AnchoredPosition.x + path: "tchat_entr\xE9e" + classID: 224 script: {fileID: 0} - curve: serializedVersion: 2 m_Curve: - time: 0 - value: 148.268555 - inSlope: -212.117325 - outSlope: -212.117325 - tangentMode: 10 - - time: .433333337 - value: 56.3510437 - inSlope: -212.117325 - outSlope: -212.117325 + value: 344 + inSlope: 0 + outSlope: 0 tangentMode: 10 m_PreInfinity: 2 m_PostInfinity: 2 - attribute: m_Center.y - path: - classID: 61 + attribute: m_SizeDelta.x + path: "tchat_entr\xE9e" + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: -172 + inSlope: 0 + outSlope: 0 + tangentMode: 10 + - time: .433333337 + value: -172 + inSlope: 0 + outSlope: 0 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_AnchoredPosition.x + path: "Image/tchat_entr\xE9e" + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 344 + inSlope: 0 + outSlope: 0 + tangentMode: 10 + - time: .433333337 + value: 344 + inSlope: 0 + outSlope: 0 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_SizeDelta.x + path: "Image/tchat_entr\xE9e" + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: -478 + inSlope: 1193.0769 + outSlope: 1193.0769 + tangentMode: 10 + - time: .433333337 + value: 39 + inSlope: 1193.0769 + outSlope: 1193.0769 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_AnchoredPosition.y + path: "Image/tchat_entr\xE9e" + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 589 + inSlope: -1193.0769 + outSlope: -1193.0769 + tangentMode: 10 + - time: .433333337 + value: 72 + inSlope: -1193.0769 + outSlope: -1193.0769 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_SizeDelta.y + path: "Image/tchat_entr\xE9e" + classID: 224 script: {fileID: 0} m_PPtrCurves: [] m_SampleRate: 30 @@ -136,16 +202,40 @@ AnimationClip: classID: 224 customType: 0 isPPtrCurve: 0 - - path: 0 - attribute: 2368279999 + - path: 2693479340 + attribute: 538195251 script: {fileID: 0} - classID: 61 + classID: 224 customType: 0 isPPtrCurve: 0 - - path: 0 - attribute: 1394318531 + - path: 2693479340 + attribute: 38095219 script: {fileID: 0} - classID: 61 + classID: 224 + customType: 0 + isPPtrCurve: 0 + - path: 678305014 + attribute: 1460864421 + script: {fileID: 0} + classID: 224 + customType: 0 + isPPtrCurve: 0 + - path: 678305014 + attribute: 1967290853 + script: {fileID: 0} + classID: 224 + customType: 0 + isPPtrCurve: 0 + - path: 2693479340 + attribute: 1460864421 + script: {fileID: 0} + classID: 224 + customType: 0 + isPPtrCurve: 0 + - path: 2693479340 + attribute: 1967290853 + script: {fileID: 0} + classID: 224 customType: 0 isPPtrCurve: 0 pptrCurveMapping: [] @@ -190,14 +280,14 @@ AnimationClip: serializedVersion: 2 m_Curve: - time: 0 - value: -142 - inSlope: 343.846161 - outSlope: 343.846161 + value: -142.800003 + inSlope: 345.692322 + outSlope: 345.692322 tangentMode: 10 - time: .433333337 value: 7 - inSlope: 343.846161 - outSlope: 343.846161 + inSlope: 345.692322 + outSlope: 345.692322 tangentMode: 10 m_PreInfinity: 2 m_PostInfinity: 2 @@ -209,14 +299,14 @@ AnimationClip: serializedVersion: 2 m_Curve: - time: 0 - value: 221 - inSlope: -343.846161 - outSlope: -343.846161 + value: 221.800003 + inSlope: -345.692322 + outSlope: -345.692322 tangentMode: 10 - time: .433333337 value: 72 - inSlope: -343.846161 - outSlope: -343.846161 + inSlope: -345.692322 + outSlope: -345.692322 tangentMode: 10 m_PreInfinity: 2 m_PostInfinity: 2 @@ -228,39 +318,105 @@ AnimationClip: serializedVersion: 2 m_Curve: - time: 0 - value: 293.045593 - inSlope: -424.229523 - outSlope: -424.229523 - tangentMode: 10 - - time: .433333337 - value: 109.212807 - inSlope: -424.229523 - outSlope: -424.229523 + value: -216 + inSlope: 0 + outSlope: 0 tangentMode: 10 m_PreInfinity: 2 m_PostInfinity: 2 - attribute: m_Size.y - path: - classID: 61 + attribute: m_AnchoredPosition.x + path: "tchat_entr\xE9e" + classID: 224 script: {fileID: 0} - curve: serializedVersion: 2 m_Curve: - time: 0 - value: 148.268555 - inSlope: -212.117325 - outSlope: -212.117325 - tangentMode: 10 - - time: .433333337 - value: 56.3510437 - inSlope: -212.117325 - outSlope: -212.117325 + value: 344 + inSlope: 0 + outSlope: 0 tangentMode: 10 m_PreInfinity: 2 m_PostInfinity: 2 - attribute: m_Center.y - path: - classID: 61 + attribute: m_SizeDelta.x + path: "tchat_entr\xE9e" + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: -172 + inSlope: 0 + outSlope: 0 + tangentMode: 10 + - time: .433333337 + value: -172 + inSlope: 0 + outSlope: 0 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_AnchoredPosition.x + path: "Image/tchat_entr\xE9e" + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 344 + inSlope: 0 + outSlope: 0 + tangentMode: 10 + - time: .433333337 + value: 344 + inSlope: 0 + outSlope: 0 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_SizeDelta.x + path: "Image/tchat_entr\xE9e" + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: -478 + inSlope: 1193.0769 + outSlope: 1193.0769 + tangentMode: 10 + - time: .433333337 + value: 39 + inSlope: 1193.0769 + outSlope: 1193.0769 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_AnchoredPosition.y + path: "Image/tchat_entr\xE9e" + classID: 224 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 589 + inSlope: -1193.0769 + outSlope: -1193.0769 + tangentMode: 10 + - time: .433333337 + value: 72 + inSlope: -1193.0769 + outSlope: -1193.0769 + tangentMode: 10 + m_PreInfinity: 2 + m_PostInfinity: 2 + attribute: m_SizeDelta.y + path: "Image/tchat_entr\xE9e" + classID: 224 script: {fileID: 0} m_EulerEditorCurves: [] m_Events: [] diff --git a/Assets/scene.unity b/Assets/scene.unity index ce8bfc3..9e1202d 100644 --- a/Assets/scene.unity +++ b/Assets/scene.unity @@ -767,8 +767,8 @@ RectTransform: m_RootOrder: 1 m_AnchorMin: {x: .5, y: .5} m_AnchorMax: {x: .5, y: .5} - m_AnchoredPosition: {x: -244.699997, y: -142} - m_SizeDelta: {x: 377, y: 221} + m_AnchoredPosition: {x: -215.899948, y: -142} + m_SizeDelta: {x: 343.5, y: 221} m_Pivot: {x: 0, y: 0} --- !u!114 &52053180 MonoBehaviour: @@ -782,7 +782,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Navigation: - m_Mode: 3 + m_Mode: 2 m_SelectOnUp: {fileID: 0} m_SelectOnDown: {fileID: 0} m_SelectOnLeft: {fileID: 0} @@ -790,8 +790,8 @@ MonoBehaviour: m_Transition: 1 m_Colors: m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1} - m_PressedColor: {r: .784313738, g: .784313738, b: .784313738, a: 1} + m_HighlightedColor: {r: .786764741, g: .531584859, b: .0752054304, a: 1} + m_PressedColor: {r: .926470578, g: 0, b: 0, a: 1} m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814} m_ColorMultiplier: 1 m_FadeDuration: .100000001 @@ -811,10 +811,10 @@ MonoBehaviour: m_ContentType: 0 m_InputType: 0 m_KeyboardType: 0 - m_LineType: 0 + m_LineType: 2 m_HideMobileInput: 0 m_CharacterValidation: 0 - m_CharacterLimit: 0 + m_CharacterLimit: 150 m_EndEdit: m_PersistentCalls: m_Calls: [] @@ -840,15 +840,15 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: .75686276, g: .75686276, b: .75686276, a: 1} + m_Color: {r: 1, g: 1, b: 1, a: 1} m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 + m_Type: 2 m_PreserveAspect: 0 - m_FillCenter: 0 + m_FillCenter: 1 m_FillMethod: 4 m_FillAmount: 1 m_FillClockwise: 1 - m_FillOrigin: 0 + m_FillOrigin: 2 --- !u!222 &52053182 CanvasRenderer: m_ObjectHideFlags: 0 @@ -4165,7 +4165,7 @@ GameObject: - 222: {fileID: 298869984} - 114: {fileID: 298869983} m_Layer: 5 - m_Name: Text + m_Name: chat_text m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -4185,8 +4185,8 @@ RectTransform: m_RootOrder: 1 m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: -20, y: -13} + m_AnchoredPosition: {x: 0, y: 1.52587891e-05} + m_SizeDelta: {x: -20, y: -12.5} m_Pivot: {x: .5, y: .5} --- !u!114 &298869983 MonoBehaviour: @@ -4200,18 +4200,18 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: .75686276, g: .75686276, b: .75686276, a: 1} + m_Color: {r: .191176474, g: .191176474, b: .191176474, a: 1} m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 + m_FontSize: 30 m_FontStyle: 0 m_BestFit: 0 m_MinSize: 10 m_MaxSize: 40 m_Alignment: 0 - m_RichText: 0 + m_RichText: 1 m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 + m_VerticalOverflow: 1 m_LineSpacing: 1 m_Text: --- !u!222 &298869984 @@ -12796,9 +12796,8 @@ GameObject: serializedVersion: 4 m_Component: - 224: {fileID: 1108071681} - - 61: {fileID: 1108071682} - - 95: {fileID: 1108071683} - 114: {fileID: 1108071684} + - 95: {fileID: 1108071682} m_Layer: 5 m_Name: tchat_complet m_TagString: Untagged @@ -12818,6 +12817,8 @@ RectTransform: m_Children: - {fileID: 1425730764} - {fileID: 52053179} + - {fileID: 1452464989} + - {fileID: 1904739803} m_Father: {fileID: 1981988301} m_RootOrder: 5 m_AnchorMin: {x: 0, y: 0} @@ -12825,18 +12826,7 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 508, y: 313} m_Pivot: {x: 0, y: 0} ---- !u!61 &1108071682 -BoxCollider2D: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1108071680} - m_Enabled: 1 - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Size: {x: 418.452545, y: 293.045593} - m_Center: {x: 212.969238, y: 148.268555} ---- !u!95 &1108071683 +--- !u!95 &1108071682 Animator: serializedVersion: 3 m_ObjectHideFlags: 0 @@ -12862,7 +12852,10 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: aab5a535908bfb14284dca66586cb1da, type: 3} m_Name: m_EditorClassIdentifier: - anim: {fileID: 0} + chat: {fileID: 298869983} + machine: {fileID: 1108071682} + charac_nb: {fileID: 1452464990} + myfield: {fileID: 52053180} --- !u!1 &1115721615 GameObject: m_ObjectHideFlags: 0 @@ -16861,6 +16854,72 @@ MeshFilter: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1450568569} m_Mesh: {fileID: 4300232, guid: 027c250b9f20b1e49903b3b4c633cd9d, type: 3} +--- !u!1 &1452464988 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 1452464989} + - 222: {fileID: 1452464991} + - 114: {fileID: 1452464990} + m_Layer: 5 + m_Name: charac_nb + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1452464989 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1452464988} + 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_Children: [] + m_Father: {fileID: 1108071681} + m_RootOrder: 2 + m_AnchorMin: {x: .5, y: .5} + m_AnchorMax: {x: .5, y: .5} + m_AnchoredPosition: {x: 103.800003, y: -132.550003} + m_SizeDelta: {x: 59, y: 18.8999996} + m_Pivot: {x: .5, y: .5} +--- !u!114 &1452464990 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1452464988} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 1 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: looool +--- !u!222 &1452464991 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1452464988} --- !u!1 &1453499515 GameObject: m_ObjectHideFlags: 0 @@ -17235,20 +17294,20 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: .823529422, g: .823529422, b: .823529422, a: .5} + m_Color: {r: .0441176295, g: .0256383382, b: .00583909824, a: .501960814} m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 2 + m_FontSize: 30 + m_FontStyle: 0 m_BestFit: 0 m_MinSize: 10 m_MaxSize: 40 - m_Alignment: 0 - m_RichText: 1 + m_Alignment: 4 + m_RichText: 0 m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: Enter text... + m_Text: Discuter ici --- !u!222 &1464389821 CanvasRenderer: m_ObjectHideFlags: 0 @@ -22378,6 +22437,67 @@ CanvasRenderer: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1896783663} +--- !u!1 &1904739802 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 1904739803} + - 222: {fileID: 1904739805} + - 114: {fileID: 1904739804} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1904739803 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1904739802} + 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_Children: [] + m_Father: {fileID: 1108071681} + m_RootOrder: 3 + m_AnchorMin: {x: .5, y: .5} + m_AnchorMax: {x: .5, y: .5} + m_AnchoredPosition: {x: -44, y: -103} + m_SizeDelta: {x: 344, y: 78} + m_Pivot: {x: .5, y: .5} +--- !u!114 &1904739804 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1904739802} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: .720588207, g: .0953719765, b: .0953719765, a: 0} + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1904739805 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1904739802} --- !u!1 &1904848815 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/scripts/OnClickedMoveCamera.cs b/Assets/scripts/OnClickedMoveCamera.cs index 1304749..471ada8 100644 --- a/Assets/scripts/OnClickedMoveCamera.cs +++ b/Assets/scripts/OnClickedMoveCamera.cs @@ -21,6 +21,7 @@ public class OnClickedMoveCamera : MonoBehaviour { void OnMouseDown(){ //Move to position + print ("test console"); camCtrl.targetPos = destination.position; camCtrl.targetRot = destination.rotation; } diff --git a/Assets/scripts/tchat_anim.cs b/Assets/scripts/tchat_anim.cs index 1c1a5f5..167476b 100644 --- a/Assets/scripts/tchat_anim.cs +++ b/Assets/scripts/tchat_anim.cs @@ -1,38 +1,81 @@ using UnityEngine; +using UnityEngine.UI; using System.Collections; public class tchat_anim : MonoBehaviour { + public Text chat; + public Animator machine; + public Text charac_nb; + public InputField myfield; + - public Animator anim; // Use this for initialization void Start () { } void Awake(){ - anim = gameObject.GetComponent (); - anim.SetBool ("etat_tchat",false); + print ("looool"); } + + public void MessageValidation (string message){ + print ("loool"); + } + // Update is called once per frame + void Update () { + + + + //transition vers chat_up + if (chat.text.Length > 20 && machine.GetInteger("etat_chat")==0) { + print ("trop long"); + machine.SetInteger ("etat_chat", 1); + charac_nb.text = " "; + + } + + //transition vers chat_long + if (chat.text.Length > 110 && machine.GetInteger("etat_chat")==1) { + print ("trop trop long"); + machine.SetInteger ("etat_chat", 2); + } + + + //affichage nombre de caractère restant. + if(Input.anyKey && machine.GetInteger("etat_chat")==2 ){ + charac_nb.text = (myfield.characterLimit - chat.text.Length).ToString(); + } + + //En cas de validation du message + if(Input.GetKeyDown("space")){ + + myfield.text=""; + charac_nb.text=""; + print ("space pressed"); + + //texte long + if(machine.GetInteger("etat_chat")==1 || machine.GetInteger("etat_chat")==2){ + machine.SetInteger ("etat_chat", 3); + } + + if(machine.GetInteger("etat_chat")==0){ + machine.SetInteger("etat_chat",5); + } + + } + + if (chat.text.Length < 20 && chat.text.Length > 0) { + machine.SetInteger ("etat_chat", 0); + + } + + } + - } - - - void OnMouseDown(){ - //Move to position - - if (anim.GetBool ("etat_tchat") == false) { - anim.SetBool ("etat_tchat", true); - } - - - if (anim.GetBool ("etat_tchat") == true) { - anim.SetBool ("etat_tchat", false); - } - } }