diff --git a/Assets/1. Cube.prefab b/Assets/1. Cube.prefab index 7b80f29..2eba09f 100644 --- a/Assets/1. Cube.prefab +++ b/Assets/1. Cube.prefab @@ -12,6 +12,7 @@ GameObject: - component: {fileID: 8039207184498597514} - component: {fileID: 331023456886542288} - component: {fileID: 1528631932536492394} + - component: {fileID: 58624349632693913} m_Layer: 0 m_Name: 1. Cube m_TagString: Untagged @@ -100,6 +101,103 @@ Animator: m_AllowConstantClipSamplingOptimization: 1 m_KeepAnimatorStateOnDisable: 0 m_WriteDefaultValuesOnDisable: 0 +--- !u!82 &58624349632693913 +AudioSource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3388591762507178167} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 0} + m_Resource: {fileID: 0} + m_PlayOnAwake: 0 + m_Volume: 1 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 500 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 0 + BypassListenerEffects: 0 + BypassReverbZones: 0 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 --- !u!1 &8034269169938238613 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/AnimSfxPlayer.cs b/Assets/AnimSfxPlayer.cs new file mode 100644 index 0000000..d8506fd --- /dev/null +++ b/Assets/AnimSfxPlayer.cs @@ -0,0 +1,11 @@ +using UnityEngine; + +public class AnimSfxPlayer : StateMachineBehaviour +{ + [SerializeField] private AudioClip _clip; + [SerializeField, Range(0, 1)] private float _relativeVolume = 1; + public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) + { + animator.GetComponent().PlayOneShot(_clip, _relativeVolume); + } +} diff --git a/Assets/AnimSfxPlayer.cs.meta b/Assets/AnimSfxPlayer.cs.meta new file mode 100644 index 0000000..cab258d --- /dev/null +++ b/Assets/AnimSfxPlayer.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 3b96577c9b2eb7643901e0e3666bb89e \ No newline at end of file diff --git a/Assets/Animations/1. Cube/1_ Cube.controller b/Assets/Animations/1. Cube/1_ Cube.controller index 263771b..7d9896c 100644 --- a/Assets/Animations/1. Cube/1_ Cube.controller +++ b/Assets/Animations/1. Cube/1_ Cube.controller @@ -25,6 +25,20 @@ AnimatorStateTransition: m_InterruptionSource: 0 m_OrderedInterruption: 1 m_CanTransitionToSelf: 0 +--- !u!114 &-7429592985429016638 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3b96577c9b2eb7643901e0e3666bb89e, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::AnimSfxPlayer + _clip: {fileID: 8300000, guid: 9685f1b8f5b780e4095bf50bb5770282, type: 3} + _relativeVolume: 1 --- !u!1101 &-7150632859244814381 AnimatorStateTransition: m_ObjectHideFlags: 1 @@ -62,7 +76,8 @@ AnimatorState: m_CycleOffset: 0 m_Transitions: - {fileID: -602570347048702700} - m_StateMachineBehaviours: [] + m_StateMachineBehaviours: + - {fileID: -7429592985429016638} m_Position: {x: 50, y: 50, z: 0} m_IKOnFeet: 0 m_WriteDefaultValues: 1 @@ -96,6 +111,7 @@ MonoBehaviour: - 2 - 3 - 4 + _instantSwitch: 0 --- !u!1101 &-5697671000731039081 AnimatorStateTransition: m_ObjectHideFlags: 1 @@ -133,7 +149,8 @@ AnimatorState: m_CycleOffset: 0 m_Transitions: - {fileID: 5372227249838831858} - m_StateMachineBehaviours: [] + m_StateMachineBehaviours: + - {fileID: 966664211623692489} m_Position: {x: 50, y: 50, z: 0} m_IKOnFeet: 0 m_WriteDefaultValues: 1 @@ -148,6 +165,34 @@ AnimatorState: m_MirrorParameter: m_CycleOffsetParameter: m_TimeParameter: +--- !u!114 &-5267897620875417393 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3b96577c9b2eb7643901e0e3666bb89e, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::AnimSfxPlayer + _clip: {fileID: 8300000, guid: ca76eb3cfe778f64b9eaf944717a34a4, type: 3} + _relativeVolume: 1 +--- !u!114 &-2779878638914207901 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3b96577c9b2eb7643901e0e3666bb89e, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::AnimSfxPlayer + _clip: {fileID: 8300000, guid: 089e9e0bbcac7104bbf00d1163550f04, type: 3} + _relativeVolume: 1 --- !u!1101 &-2657751550537078569 AnimatorStateTransition: m_ObjectHideFlags: 1 @@ -207,7 +252,8 @@ AnimatorState: m_CycleOffset: 0 m_Transitions: - {fileID: -1687643949439196156} - m_StateMachineBehaviours: [] + m_StateMachineBehaviours: + - {fileID: 1636448997929893962} m_Position: {x: 50, y: 50, z: 0} m_IKOnFeet: 0 m_WriteDefaultValues: 1 @@ -229,10 +275,7 @@ AnimatorStateTransition: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: - m_Conditions: - - m_ConditionMode: 1 - m_ConditionEvent: Idle - m_EventTreshold: 0 + m_Conditions: [] m_DstStateMachine: {fileID: 0} m_DstState: {fileID: 5104166289829408018} m_Solo: 0 @@ -259,7 +302,8 @@ AnimatorState: m_CycleOffset: 0 m_Transitions: - {fileID: 2206614485083948045} - m_StateMachineBehaviours: [] + m_StateMachineBehaviours: + - {fileID: -2779878638914207901} m_Position: {x: 50, y: 50, z: 0} m_IKOnFeet: 0 m_WriteDefaultValues: 1 @@ -363,7 +407,8 @@ AnimatorState: m_CycleOffset: 0 m_Transitions: - {fileID: 4053007077391768389} - m_StateMachineBehaviours: [] + m_StateMachineBehaviours: + - {fileID: -5267897620875417393} m_Position: {x: 50, y: 50, z: 0} m_IKOnFeet: 0 m_WriteDefaultValues: 1 @@ -403,6 +448,34 @@ AnimatorStateTransition: m_InterruptionSource: 0 m_OrderedInterruption: 1 m_CanTransitionToSelf: 0 +--- !u!114 &966664211623692489 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3b96577c9b2eb7643901e0e3666bb89e, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::AnimSfxPlayer + _clip: {fileID: 8300000, guid: 089e9e0bbcac7104bbf00d1163550f04, type: 3} + _relativeVolume: 1 +--- !u!114 &1636448997929893962 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3b96577c9b2eb7643901e0e3666bb89e, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::AnimSfxPlayer + _clip: {fileID: 8300000, guid: 089e9e0bbcac7104bbf00d1163550f04, type: 3} + _relativeVolume: 1 --- !u!1101 &2206614485083948045 AnimatorStateTransition: m_ObjectHideFlags: 1 @@ -425,6 +498,34 @@ AnimatorStateTransition: m_InterruptionSource: 0 m_OrderedInterruption: 1 m_CanTransitionToSelf: 1 +--- !u!114 &2395771590327676003 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3b96577c9b2eb7643901e0e3666bb89e, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::AnimSfxPlayer + _clip: {fileID: 8300000, guid: 06d94813ba0e12a4ea57ce8480c75f70, type: 3} + _relativeVolume: 1 +--- !u!114 &2583175169218454795 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3b96577c9b2eb7643901e0e3666bb89e, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::AnimSfxPlayer + _clip: {fileID: 8300000, guid: 9b93e7019dad2aa40b899f2f9480a778, type: 3} + _relativeVolume: 1 --- !u!1101 &2749330595987890861 AnimatorStateTransition: m_ObjectHideFlags: 1 @@ -707,7 +808,8 @@ AnimatorState: m_CycleOffset: 0 m_Transitions: - {fileID: 3254519814000987391} - m_StateMachineBehaviours: [] + m_StateMachineBehaviours: + - {fileID: 2395771590327676003} m_Position: {x: 50, y: 50, z: 0} m_IKOnFeet: 0 m_WriteDefaultValues: 1 @@ -734,7 +836,8 @@ AnimatorState: m_CycleOffset: 0 m_Transitions: - {fileID: 7466203507515248281} - m_StateMachineBehaviours: [] + m_StateMachineBehaviours: + - {fileID: 2583175169218454795} m_Position: {x: 50, y: 50, z: 0} m_IKOnFeet: 0 m_WriteDefaultValues: 1 diff --git a/Assets/Animations/5. Feeshka/5_ Feeshka.controller b/Assets/Animations/5. Feeshka/5_ Feeshka.controller index 57038a1..93353f6 100644 --- a/Assets/Animations/5. Feeshka/5_ Feeshka.controller +++ b/Assets/Animations/5. Feeshka/5_ Feeshka.controller @@ -421,25 +421,25 @@ AnimatorStateMachine: m_ChildStates: - serializedVersion: 1 m_State: {fileID: 5065221806720206088} - m_Position: {x: 300, y: 200, z: 0} + m_Position: {x: 500, y: 200, z: 0} - serializedVersion: 1 m_State: {fileID: -2788903740698566944} - m_Position: {x: 600, y: -30, z: 0} + m_Position: {x: 810, y: -10, z: 0} - serializedVersion: 1 m_State: {fileID: -5013653162103904771} - m_Position: {x: -230, y: 120, z: 0} + m_Position: {x: -140, y: 130, z: 0} - serializedVersion: 1 m_State: {fileID: -8530628451578825932} - m_Position: {x: 600, y: 30, z: 0} + m_Position: {x: 810, y: 50, z: 0} - serializedVersion: 1 m_State: {fileID: -1368940986197246744} - m_Position: {x: 100, y: -50, z: 0} + m_Position: {x: 250, y: 60, z: 0} - serializedVersion: 1 m_State: {fileID: 5202742613501531865} - m_Position: {x: 600, y: 100, z: 0} + m_Position: {x: 810, y: 120, z: 0} - serializedVersion: 1 m_State: {fileID: 5718452724475859435} - m_Position: {x: 300, y: 40, z: 0} + m_Position: {x: 500, y: 60, z: 0} - serializedVersion: 1 m_State: {fileID: -5367947394430764701} m_Position: {x: 0, y: 200, z: 0} @@ -451,8 +451,8 @@ AnimatorStateMachine: m_EntryTransitions: [] m_StateMachineTransitions: {} m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: 40, y: 70, z: 0} - m_EntryPosition: {x: 0, y: 270, z: 0} + m_AnyStatePosition: {x: 20, y: 70, z: 0} + m_EntryPosition: {x: 20, y: 270, z: 0} m_ExitPosition: {x: 970, y: 250, z: 0} m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} m_DefaultState: {fileID: -5367947394430764701} diff --git a/Assets/Sprites/Characters/6. RoboBoy/Sleep.anim b/Assets/Animations/6. Boy/Sleep.anim similarity index 100% rename from Assets/Sprites/Characters/6. RoboBoy/Sleep.anim rename to Assets/Animations/6. Boy/Sleep.anim diff --git a/Assets/Sprites/Characters/6. RoboBoy/Sleep.anim.meta b/Assets/Animations/6. Boy/Sleep.anim.meta similarity index 100% rename from Assets/Sprites/Characters/6. RoboBoy/Sleep.anim.meta rename to Assets/Animations/6. Boy/Sleep.anim.meta diff --git a/Assets/Animations/7. Girl/7_ Girl.controller b/Assets/Animations/7. Girl/7_ Girl.controller index 8536e14..833adc8 100644 --- a/Assets/Animations/7. Girl/7_ Girl.controller +++ b/Assets/Animations/7. Girl/7_ Girl.controller @@ -533,7 +533,10 @@ AnimatorStateTransition: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: - m_Conditions: [] + m_Conditions: + - m_ConditionMode: 1 + m_ConditionEvent: Sleep + m_EventTreshold: 0 m_DstStateMachine: {fileID: 0} m_DstState: {fileID: -2081372429537587852} m_Solo: 0 diff --git a/Assets/Sprites/Characters/7. RoboGirl/Sleep.anim b/Assets/Animations/7. Girl/Sleep.anim similarity index 100% rename from Assets/Sprites/Characters/7. RoboGirl/Sleep.anim rename to Assets/Animations/7. Girl/Sleep.anim diff --git a/Assets/Sprites/Characters/7. RoboGirl/Sleep.anim.meta b/Assets/Animations/7. Girl/Sleep.anim.meta similarity index 100% rename from Assets/Sprites/Characters/7. RoboGirl/Sleep.anim.meta rename to Assets/Animations/7. Girl/Sleep.anim.meta diff --git a/Assets/CharacterSound.meta b/Assets/CharacterSound.meta new file mode 100644 index 0000000..378d019 --- /dev/null +++ b/Assets/CharacterSound.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e904dbc53f571bc409c4a0b3aff3808d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/CharacterSound/1. CubeSounds.meta b/Assets/CharacterSound/1. CubeSounds.meta new file mode 100644 index 0000000..d4163f5 --- /dev/null +++ b/Assets/CharacterSound/1. CubeSounds.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5056870893e09f54db703e117182f899 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/CharacterSound/1. CubeSounds/Cube Idle1.wav b/Assets/CharacterSound/1. CubeSounds/Cube Idle1.wav new file mode 100644 index 0000000..c4bbe78 Binary files /dev/null and b/Assets/CharacterSound/1. CubeSounds/Cube Idle1.wav differ diff --git a/Assets/CharacterSound/1. CubeSounds/Cube Idle1.wav.meta b/Assets/CharacterSound/1. CubeSounds/Cube Idle1.wav.meta new file mode 100644 index 0000000..46c4892 --- /dev/null +++ b/Assets/CharacterSound/1. CubeSounds/Cube Idle1.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 06d94813ba0e12a4ea57ce8480c75f70 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/CharacterSound/1. CubeSounds/Cube Idle2.wav b/Assets/CharacterSound/1. CubeSounds/Cube Idle2.wav new file mode 100644 index 0000000..b67a54a Binary files /dev/null and b/Assets/CharacterSound/1. CubeSounds/Cube Idle2.wav differ diff --git a/Assets/CharacterSound/1. CubeSounds/Cube Idle2.wav.meta b/Assets/CharacterSound/1. CubeSounds/Cube Idle2.wav.meta new file mode 100644 index 0000000..095aa9c --- /dev/null +++ b/Assets/CharacterSound/1. CubeSounds/Cube Idle2.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 089e9e0bbcac7104bbf00d1163550f04 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 1 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/CharacterSound/1. CubeSounds/Cube Win.mp3 b/Assets/CharacterSound/1. CubeSounds/Cube Win.mp3 new file mode 100644 index 0000000..63fe60a Binary files /dev/null and b/Assets/CharacterSound/1. CubeSounds/Cube Win.mp3 differ diff --git a/Assets/CharacterSound/1. CubeSounds/Cube Win.mp3.meta b/Assets/CharacterSound/1. CubeSounds/Cube Win.mp3.meta new file mode 100644 index 0000000..1cb37b1 --- /dev/null +++ b/Assets/CharacterSound/1. CubeSounds/Cube Win.mp3.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 9685f1b8f5b780e4095bf50bb5770282 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/CharacterSound/1. CubeSounds/Cube appearing.wav b/Assets/CharacterSound/1. CubeSounds/Cube appearing.wav new file mode 100644 index 0000000..79dea91 Binary files /dev/null and b/Assets/CharacterSound/1. CubeSounds/Cube appearing.wav differ diff --git a/Assets/CharacterSound/1. CubeSounds/Cube appearing.wav.meta b/Assets/CharacterSound/1. CubeSounds/Cube appearing.wav.meta new file mode 100644 index 0000000..1b8c73b --- /dev/null +++ b/Assets/CharacterSound/1. CubeSounds/Cube appearing.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 9b93e7019dad2aa40b899f2f9480a778 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 1 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/CharacterSound/1. CubeSounds/CubeLose.mp3 b/Assets/CharacterSound/1. CubeSounds/CubeLose.mp3 new file mode 100644 index 0000000..b59e042 Binary files /dev/null and b/Assets/CharacterSound/1. CubeSounds/CubeLose.mp3 differ diff --git a/Assets/CharacterSound/1. CubeSounds/CubeLose.mp3.meta b/Assets/CharacterSound/1. CubeSounds/CubeLose.mp3.meta new file mode 100644 index 0000000..4e444dd --- /dev/null +++ b/Assets/CharacterSound/1. CubeSounds/CubeLose.mp3.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: ca76eb3cfe778f64b9eaf944717a34a4 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Data/1. Cube.asset b/Assets/Data/1. Cube.asset new file mode 100644 index 0000000..0ce1401 --- /dev/null +++ b/Assets/Data/1. Cube.asset @@ -0,0 +1,21 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fb10f9bdeb89ca14d8ed3d5824e2651d, type: 3} + m_Name: 1. Cube + m_EditorClassIdentifier: Assembly-CSharp::CharacterSystem.ReplicasContainer + _appearReplicas: {fileID: 0} + _playerTurnReplicas: {fileID: 0} + _botTurnReplicas: {fileID: 0} + _playerWinReplicas: {fileID: 0} + _botWinReplicas: {fileID: 0} + _returnReplicas: {fileID: 0} + _drawReplicas: {fileID: 0} diff --git a/Assets/Data/1. Cube.asset.meta b/Assets/Data/1. Cube.asset.meta new file mode 100644 index 0000000..759f381 --- /dev/null +++ b/Assets/Data/1. Cube.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1a042f31f2c98b64fb2511191b1d1001 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Characters.meta b/Assets/Prefabs/Characters.meta new file mode 100644 index 0000000..8406ebb --- /dev/null +++ b/Assets/Prefabs/Characters.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9e46df9c05299444b988225b07940260 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/2. Electro.prefab b/Assets/Prefabs/Characters/2. Electro.prefab similarity index 100% rename from Assets/2. Electro.prefab rename to Assets/Prefabs/Characters/2. Electro.prefab diff --git a/Assets/2. Electro.prefab.meta b/Assets/Prefabs/Characters/2. Electro.prefab.meta similarity index 100% rename from Assets/2. Electro.prefab.meta rename to Assets/Prefabs/Characters/2. Electro.prefab.meta diff --git a/Assets/3. Wolf.prefab b/Assets/Prefabs/Characters/3. Wolf.prefab similarity index 100% rename from Assets/3. Wolf.prefab rename to Assets/Prefabs/Characters/3. Wolf.prefab diff --git a/Assets/3. Wolf.prefab.meta b/Assets/Prefabs/Characters/3. Wolf.prefab.meta similarity index 100% rename from Assets/3. Wolf.prefab.meta rename to Assets/Prefabs/Characters/3. Wolf.prefab.meta diff --git a/Assets/4. Sam.prefab b/Assets/Prefabs/Characters/4. Sam.prefab similarity index 100% rename from Assets/4. Sam.prefab rename to Assets/Prefabs/Characters/4. Sam.prefab diff --git a/Assets/4. Sam.prefab.meta b/Assets/Prefabs/Characters/4. Sam.prefab.meta similarity index 100% rename from Assets/4. Sam.prefab.meta rename to Assets/Prefabs/Characters/4. Sam.prefab.meta diff --git a/Assets/5. Feeshka.prefab b/Assets/Prefabs/Characters/5. Feeshka.prefab similarity index 100% rename from Assets/5. Feeshka.prefab rename to Assets/Prefabs/Characters/5. Feeshka.prefab diff --git a/Assets/5. Feeshka.prefab.meta b/Assets/Prefabs/Characters/5. Feeshka.prefab.meta similarity index 100% rename from Assets/5. Feeshka.prefab.meta rename to Assets/Prefabs/Characters/5. Feeshka.prefab.meta diff --git a/Assets/6. BoyNextDoor.prefab b/Assets/Prefabs/Characters/6. BoyNextDoor.prefab similarity index 100% rename from Assets/6. BoyNextDoor.prefab rename to Assets/Prefabs/Characters/6. BoyNextDoor.prefab diff --git a/Assets/6. BoyNextDoor.prefab.meta b/Assets/Prefabs/Characters/6. BoyNextDoor.prefab.meta similarity index 100% rename from Assets/6. BoyNextDoor.prefab.meta rename to Assets/Prefabs/Characters/6. BoyNextDoor.prefab.meta diff --git a/Assets/7. Girl.prefab b/Assets/Prefabs/Characters/7. Girl.prefab similarity index 100% rename from Assets/7. Girl.prefab rename to Assets/Prefabs/Characters/7. Girl.prefab diff --git a/Assets/7. Girl.prefab.meta b/Assets/Prefabs/Characters/7. Girl.prefab.meta similarity index 100% rename from Assets/7. Girl.prefab.meta rename to Assets/Prefabs/Characters/7. Girl.prefab.meta diff --git a/Assets/Scenes/CharactersTest.unity b/Assets/Scenes/CharactersTest.unity index 74f71c3..f0d0ffd 100644 --- a/Assets/Scenes/CharactersTest.unity +++ b/Assets/Scenes/CharactersTest.unity @@ -171,6 +171,10 @@ PrefabInstance: propertyPath: m_Name value: 6. BoyNextDoor objectReference: {fileID: 0} + - target: {fileID: 6069554613919803763, guid: a6618e61e181953458cf6769884c4403, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] @@ -365,6 +369,10 @@ PrefabInstance: propertyPath: m_Name value: 4. Sam objectReference: {fileID: 0} + - target: {fileID: 7238525776732110314, guid: d2448bca251e50a4ebaae923084264a0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] @@ -382,13 +390,25 @@ PrefabInstance: propertyPath: m_Name value: 3. Wolf objectReference: {fileID: 0} + - target: {fileID: 4672236760054860725, guid: eb3cf1ffcc790864db631f50a02da123, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7360891851470844778, guid: eb3cf1ffcc790864db631f50a02da123, type: 3} + propertyPath: m_LocalScale.x + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 7360891851470844778, guid: eb3cf1ffcc790864db631f50a02da123, type: 3} + propertyPath: m_LocalScale.y + value: 2 + objectReference: {fileID: 0} - target: {fileID: 7360891851470844778, guid: eb3cf1ffcc790864db631f50a02da123, type: 3} propertyPath: m_LocalPosition.x - value: -2.73 + value: -3.065 objectReference: {fileID: 0} - target: {fileID: 7360891851470844778, guid: eb3cf1ffcc790864db631f50a02da123, type: 3} propertyPath: m_LocalPosition.y - value: 1.28 + value: 0.076 objectReference: {fileID: 0} - target: {fileID: 7360891851470844778, guid: eb3cf1ffcc790864db631f50a02da123, type: 3} propertyPath: m_LocalPosition.z @@ -439,6 +459,10 @@ PrefabInstance: propertyPath: m_Name value: 1. Cube objectReference: {fileID: 0} + - target: {fileID: 3388591762507178167, guid: 7702b7919503a1e479151e8fecd78924, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} - target: {fileID: 8604408698177003535, guid: 7702b7919503a1e479151e8fecd78924, type: 3} propertyPath: m_LocalPosition.x value: -5.78641 @@ -537,6 +561,10 @@ PrefabInstance: propertyPath: m_Name value: 7. Girl objectReference: {fileID: 0} + - target: {fileID: 6156076713058116187, guid: b268c439fa90d6542ab0c876cd677661, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] @@ -554,6 +582,10 @@ PrefabInstance: propertyPath: m_Name value: 2. Electro objectReference: {fileID: 0} + - target: {fileID: 216986101277937167, guid: 53736a6cd29210e4eb0f110ef04d344c, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} - target: {fileID: 8312733962015895203, guid: 53736a6cd29210e4eb0f110ef04d344c, type: 3} propertyPath: m_LocalPosition.x value: -4.17 @@ -651,6 +683,10 @@ PrefabInstance: propertyPath: m_Name value: 5. Feeshka objectReference: {fileID: 0} + - target: {fileID: 5358438370345097688, guid: f1fc145bd1885e146bc33b2669940862, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] diff --git a/Assets/Scripts/Common/SoundManager.cs b/Assets/Scripts/Common/SoundManager.cs index d1f59ee..af9d51c 100644 --- a/Assets/Scripts/Common/SoundManager.cs +++ b/Assets/Scripts/Common/SoundManager.cs @@ -148,6 +148,32 @@ public class SoundManager : MonoBehaviour // Возвращаем в пул через время клипа StartCoroutine(ReturnToPool(effect, clipToPlay.length)); } + + public void playClip(AudioClip clip, float volume) + { + if (clip == null) + { + Debug.LogWarning("Не установлен звук"); + return; + } + GameObject effect = GetPooledAudioObject(); + AudioSource audioSource = effect.GetComponent(); + + //AudioClip clipToPlay = GameManager.instance.currentPlayer == CellState.Player1 ? down1 : down2; + AudioClip clipToPlay = clip; + + + + audioSource.clip = clipToPlay; + audioSource.pitch = 1; + audioSource.volume = effectsVolume * volume; + + effect.SetActive(true); + audioSource.Play(); + + // Возвращаем в пул через время клипа + StartCoroutine(ReturnToPool(effect, clipToPlay.length)); + } public void playDropDown() {