畑の肥料演出制御追加
This commit is contained in:
		
							parent
							
								
									88f44cf16c
								
							
						
					
					
						commit
						6a955510b2
					
				|  | @ -7,7 +7,7 @@ AnimatorState: | ||||||
|   m_CorrespondingSourceObject: {fileID: 0} |   m_CorrespondingSourceObject: {fileID: 0} | ||||||
|   m_PrefabInstance: {fileID: 0} |   m_PrefabInstance: {fileID: 0} | ||||||
|   m_PrefabAsset: {fileID: 0} |   m_PrefabAsset: {fileID: 0} | ||||||
|   m_Name: New State |   m_Name: Wait | ||||||
|   m_Speed: 1 |   m_Speed: 1 | ||||||
|   m_CycleOffset: 0 |   m_CycleOffset: 0 | ||||||
|   m_Transitions: [] |   m_Transitions: [] | ||||||
|  | @ -26,6 +26,28 @@ AnimatorState: | ||||||
|   m_MirrorParameter:  |   m_MirrorParameter:  | ||||||
|   m_CycleOffsetParameter:  |   m_CycleOffsetParameter:  | ||||||
|   m_TimeParameter:  |   m_TimeParameter:  | ||||||
|  | --- !u!1101 &-4430993135790780879 | ||||||
|  | AnimatorStateTransition: | ||||||
|  |   m_ObjectHideFlags: 1 | ||||||
|  |   m_CorrespondingSourceObject: {fileID: 0} | ||||||
|  |   m_PrefabInstance: {fileID: 0} | ||||||
|  |   m_PrefabAsset: {fileID: 0} | ||||||
|  |   m_Name:  | ||||||
|  |   m_Conditions: [] | ||||||
|  |   m_DstStateMachine: {fileID: 0} | ||||||
|  |   m_DstState: {fileID: -8729623520970158736} | ||||||
|  |   m_Solo: 0 | ||||||
|  |   m_Mute: 0 | ||||||
|  |   m_IsExit: 0 | ||||||
|  |   serializedVersion: 3 | ||||||
|  |   m_TransitionDuration: 0 | ||||||
|  |   m_TransitionOffset: 0 | ||||||
|  |   m_ExitTime: 0.875 | ||||||
|  |   m_HasExitTime: 0 | ||||||
|  |   m_HasFixedDuration: 1 | ||||||
|  |   m_InterruptionSource: 0 | ||||||
|  |   m_OrderedInterruption: 1 | ||||||
|  |   m_CanTransitionToSelf: 1 | ||||||
| --- !u!91 &9100000 | --- !u!91 &9100000 | ||||||
| AnimatorController: | AnimatorController: | ||||||
|   m_ObjectHideFlags: 0 |   m_ObjectHideFlags: 0 | ||||||
|  | @ -59,10 +81,10 @@ AnimatorStateMachine: | ||||||
|   m_ChildStates: |   m_ChildStates: | ||||||
|   - serializedVersion: 1 |   - serializedVersion: 1 | ||||||
|     m_State: {fileID: 3124530945641461338} |     m_State: {fileID: 3124530945641461338} | ||||||
|     m_Position: {x: 290, y: 60, z: 0} |     m_Position: {x: 290, y: 20, z: 0} | ||||||
|   - serializedVersion: 1 |   - serializedVersion: 1 | ||||||
|     m_State: {fileID: -8729623520970158736} |     m_State: {fileID: -8729623520970158736} | ||||||
|     m_Position: {x: 290, y: 130, z: 0} |     m_Position: {x: 290, y: 120, z: 0} | ||||||
|   m_ChildStateMachines: [] |   m_ChildStateMachines: [] | ||||||
|   m_AnyStateTransitions: [] |   m_AnyStateTransitions: [] | ||||||
|   m_EntryTransitions: [] |   m_EntryTransitions: [] | ||||||
|  | @ -83,7 +105,8 @@ AnimatorState: | ||||||
|   m_Name: SoilLight |   m_Name: SoilLight | ||||||
|   m_Speed: 1 |   m_Speed: 1 | ||||||
|   m_CycleOffset: 0 |   m_CycleOffset: 0 | ||||||
|   m_Transitions: [] |   m_Transitions: | ||||||
|  |   - {fileID: -4430993135790780879} | ||||||
|   m_StateMachineBehaviours: [] |   m_StateMachineBehaviours: [] | ||||||
|   m_Position: {x: 50, y: 50, z: 0} |   m_Position: {x: 50, y: 50, z: 0} | ||||||
|   m_IKOnFeet: 0 |   m_IKOnFeet: 0 | ||||||
|  |  | ||||||
|  | @ -1183,7 +1183,7 @@ PrefabInstance: | ||||||
|     - target: {fileID: 1909038109161790577, guid: caaa748dbeed576499e8cae74d33f689, |     - target: {fileID: 1909038109161790577, guid: caaa748dbeed576499e8cae74d33f689, | ||||||
|         type: 3} |         type: 3} | ||||||
|       propertyPath: m_RootOrder |       propertyPath: m_RootOrder | ||||||
|       value: 6 |       value: 7 | ||||||
|       objectReference: {fileID: 0} |       objectReference: {fileID: 0} | ||||||
|     - target: {fileID: 2535613031869306226, guid: caaa748dbeed576499e8cae74d33f689, |     - target: {fileID: 2535613031869306226, guid: caaa748dbeed576499e8cae74d33f689, | ||||||
|         type: 3} |         type: 3} | ||||||
|  | @ -1438,7 +1438,7 @@ PrefabInstance: | ||||||
|     - target: {fileID: 8103176713869808018, guid: caaa748dbeed576499e8cae74d33f689, |     - target: {fileID: 8103176713869808018, guid: caaa748dbeed576499e8cae74d33f689, | ||||||
|         type: 3} |         type: 3} | ||||||
|       propertyPath: m_RootOrder |       propertyPath: m_RootOrder | ||||||
|       value: 7 |       value: 6 | ||||||
|       objectReference: {fileID: 0} |       objectReference: {fileID: 0} | ||||||
|     - target: {fileID: 8136363072906095234, guid: caaa748dbeed576499e8cae74d33f689, |     - target: {fileID: 8136363072906095234, guid: caaa748dbeed576499e8cae74d33f689, | ||||||
|         type: 3} |         type: 3} | ||||||
|  | @ -1697,6 +1697,12 @@ CanvasRenderer: | ||||||
|   m_PrefabAsset: {fileID: 0} |   m_PrefabAsset: {fileID: 0} | ||||||
|   m_GameObject: {fileID: 457045027} |   m_GameObject: {fileID: 457045027} | ||||||
|   m_CullTransparentMesh: 0 |   m_CullTransparentMesh: 0 | ||||||
|  | --- !u!95 &473560054 stripped | ||||||
|  | Animator: | ||||||
|  |   m_CorrespondingSourceObject: {fileID: 1908936244342333737, guid: 0949d70c1a73342ca8955c7f59c04fe0, | ||||||
|  |     type: 3} | ||||||
|  |   m_PrefabInstance: {fileID: 1958951427} | ||||||
|  |   m_PrefabAsset: {fileID: 0} | ||||||
| --- !u!1 &492106929 stripped | --- !u!1 &492106929 stripped | ||||||
| GameObject: | GameObject: | ||||||
|   m_CorrespondingSourceObject: {fileID: 1507187602806663288, guid: 21599f8e6d1104a07b0b14b49f8c1429, |   m_CorrespondingSourceObject: {fileID: 1507187602806663288, guid: 21599f8e6d1104a07b0b14b49f8c1429, | ||||||
|  | @ -2445,6 +2451,7 @@ GameObject: | ||||||
|   - component: {fileID: 715847676} |   - component: {fileID: 715847676} | ||||||
|   - component: {fileID: 715847675} |   - component: {fileID: 715847675} | ||||||
|   - component: {fileID: 715847677} |   - component: {fileID: 715847677} | ||||||
|  |   - component: {fileID: 715847678} | ||||||
|   m_Layer: 0 |   m_Layer: 0 | ||||||
|   m_Name: Manager |   m_Name: Manager | ||||||
|   m_TagString: Untagged |   m_TagString: Untagged | ||||||
|  | @ -2480,6 +2487,7 @@ MonoBehaviour: | ||||||
|   harvestInsertPosition: {fileID: 895001959} |   harvestInsertPosition: {fileID: 895001959} | ||||||
|   cornHarvester: {fileID: 282523124} |   cornHarvester: {fileID: 282523124} | ||||||
|   fertilizerButtonView: {fileID: 525465089} |   fertilizerButtonView: {fileID: 525465089} | ||||||
|  |   fertilizerEffectView: {fileID: 715847678} | ||||||
|   brotherFertilizerAnimation: {fileID: 715847677} |   brotherFertilizerAnimation: {fileID: 715847677} | ||||||
|   counterView: {fileID: 1507187603938887411} |   counterView: {fileID: 1507187603938887411} | ||||||
|   additionView: {fileID: 347092272} |   additionView: {fileID: 347092272} | ||||||
|  | @ -2522,6 +2530,23 @@ MonoBehaviour: | ||||||
|   blueFarmingTarget: {fileID: 1185335240} |   blueFarmingTarget: {fileID: 1185335240} | ||||||
|   blueWalkEndTarget: {fileID: 315104242} |   blueWalkEndTarget: {fileID: 315104242} | ||||||
|   walkSpeed: 1.2 |   walkSpeed: 1.2 | ||||||
|  | --- !u!114 &715847678 | ||||||
|  | MonoBehaviour: | ||||||
|  |   m_ObjectHideFlags: 0 | ||||||
|  |   m_CorrespondingSourceObject: {fileID: 0} | ||||||
|  |   m_PrefabInstance: {fileID: 0} | ||||||
|  |   m_PrefabAsset: {fileID: 0} | ||||||
|  |   m_GameObject: {fileID: 715847674} | ||||||
|  |   m_Enabled: 1 | ||||||
|  |   m_EditorHideFlags: 0 | ||||||
|  |   m_Script: {fileID: 11500000, guid: 215e80c98433449a8e6afde20d84500b, type: 3} | ||||||
|  |   m_Name:  | ||||||
|  |   m_EditorClassIdentifier:  | ||||||
|  |   feverFrontLight: {fileID: 808543705} | ||||||
|  |   feverBackLight: {fileID: 645963150} | ||||||
|  |   soilTopLightAnimator: {fileID: 1604139295} | ||||||
|  |   soilCenterLightAnimator: {fileID: 1309667616} | ||||||
|  |   soilBottomLightAnimator: {fileID: 473560054} | ||||||
| --- !u!1 &727483538 | --- !u!1 &727483538 | ||||||
| GameObject: | GameObject: | ||||||
|   m_ObjectHideFlags: 0 |   m_ObjectHideFlags: 0 | ||||||
|  | @ -2783,6 +2808,12 @@ SortingGroup: | ||||||
|   m_SortingLayerID: 0 |   m_SortingLayerID: 0 | ||||||
|   m_SortingLayer: 0 |   m_SortingLayer: 0 | ||||||
|   m_SortingOrder: 28 |   m_SortingOrder: 28 | ||||||
|  | --- !u!1 &808543705 stripped | ||||||
|  | GameObject: | ||||||
|  |   m_CorrespondingSourceObject: {fileID: 7938088450268634930, guid: 307de4ac51c99479a95079dfa3713f04, | ||||||
|  |     type: 3} | ||||||
|  |   m_PrefabInstance: {fileID: 4107102217382154191} | ||||||
|  |   m_PrefabAsset: {fileID: 0} | ||||||
| --- !u!1 &877205765 | --- !u!1 &877205765 | ||||||
| GameObject: | GameObject: | ||||||
|   m_ObjectHideFlags: 0 |   m_ObjectHideFlags: 0 | ||||||
|  | @ -4129,6 +4160,12 @@ SpriteRenderer: | ||||||
|   m_WasSpriteAssigned: 1 |   m_WasSpriteAssigned: 1 | ||||||
|   m_MaskInteraction: 0 |   m_MaskInteraction: 0 | ||||||
|   m_SpriteSortPoint: 0 |   m_SpriteSortPoint: 0 | ||||||
|  | --- !u!95 &1309667616 stripped | ||||||
|  | Animator: | ||||||
|  |   m_CorrespondingSourceObject: {fileID: 802767284876391491, guid: 5e326851a49dc4fd9b51d54fb58f4e02, | ||||||
|  |     type: 3} | ||||||
|  |   m_PrefabInstance: {fileID: 279224989} | ||||||
|  |   m_PrefabAsset: {fileID: 0} | ||||||
| --- !u!1 &1321959278 | --- !u!1 &1321959278 | ||||||
| GameObject: | GameObject: | ||||||
|   m_ObjectHideFlags: 0 |   m_ObjectHideFlags: 0 | ||||||
|  | @ -5113,6 +5150,12 @@ SpriteRenderer: | ||||||
|   m_WasSpriteAssigned: 1 |   m_WasSpriteAssigned: 1 | ||||||
|   m_MaskInteraction: 0 |   m_MaskInteraction: 0 | ||||||
|   m_SpriteSortPoint: 0 |   m_SpriteSortPoint: 0 | ||||||
|  | --- !u!95 &1604139295 stripped | ||||||
|  | Animator: | ||||||
|  |   m_CorrespondingSourceObject: {fileID: 1908936244342333737, guid: 0949d70c1a73342ca8955c7f59c04fe0, | ||||||
|  |     type: 3} | ||||||
|  |   m_PrefabInstance: {fileID: 1589622939} | ||||||
|  |   m_PrefabAsset: {fileID: 0} | ||||||
| --- !u!114 &1656378502 stripped | --- !u!114 &1656378502 stripped | ||||||
| MonoBehaviour: | MonoBehaviour: | ||||||
|   m_CorrespondingSourceObject: {fileID: 3767471200807653374, guid: 0949d70c1a73342ca8955c7f59c04fe0, |   m_CorrespondingSourceObject: {fileID: 3767471200807653374, guid: 0949d70c1a73342ca8955c7f59c04fe0, | ||||||
|  |  | ||||||
|  | @ -33,13 +33,15 @@ public class CornField : MonoBehaviour | ||||||
|     [SerializeField] private Transform harvestInsertPosition; |     [SerializeField] private Transform harvestInsertPosition; | ||||||
|     [SerializeField] private CornHarvester cornHarvester; |     [SerializeField] private CornHarvester cornHarvester; | ||||||
|     [SerializeField] private FertilizerButtonView fertilizerButtonView; |     [SerializeField] private FertilizerButtonView fertilizerButtonView; | ||||||
|  |     [SerializeField] private FertilizerEffectView fertilizerEffectView; | ||||||
|     [SerializeField] private BrotherFertilizerAnimation brotherFertilizerAnimation; |     [SerializeField] private BrotherFertilizerAnimation brotherFertilizerAnimation; | ||||||
|     [SerializeField] private HarvestedCounterView counterView; |     [SerializeField] private HarvestedCounterView counterView; | ||||||
|     [SerializeField] private HarvestedAdditionView additionView; |     [SerializeField] private HarvestedAdditionView additionView; | ||||||
|     [SerializeField] private Transform animationTarget; |     [SerializeField] private Transform animationTarget; | ||||||
|     [Space] |     [Space] | ||||||
|     [SerializeField] private List<PlantLine> plantLines = new List<PlantLine>(); |     [SerializeField] private List<PlantLine> plantLines = new List<PlantLine>(); | ||||||
|     [Space] [SerializeField] private TutorialObjectMask cornFieldMask; |     [Space] | ||||||
|  |     [SerializeField] private TutorialObjectMask cornFieldMask; | ||||||
|      |      | ||||||
|     private static readonly int maxPeriod = 60; |     private static readonly int maxPeriod = 60; | ||||||
|     private static readonly int minPeriod = 45; |     private static readonly int minPeriod = 45; | ||||||
|  | @ -159,6 +161,7 @@ public class CornField : MonoBehaviour | ||||||
|                 additionView.IsStopDisapper = true; |                 additionView.IsStopDisapper = true; | ||||||
|                 SoundManager.Instance.PlayBGM("bgm_fertilizer"); |                 SoundManager.Instance.PlayBGM("bgm_fertilizer"); | ||||||
|                 brotherFertilizerAnimation.StartAnimation(); |                 brotherFertilizerAnimation.StartAnimation(); | ||||||
|  |                 fertilizerEffectView.SetActive(true); | ||||||
|                 // button非表示 |                 // button非表示 | ||||||
|                 promoteGrowthButton.gameObject.SetActive(false); |                 promoteGrowthButton.gameObject.SetActive(false); | ||||||
|                 sideButtons.SetActive(false); |                 sideButtons.SetActive(false); | ||||||
|  | @ -199,6 +202,7 @@ public class CornField : MonoBehaviour | ||||||
|                     { |                     { | ||||||
|                         SoundManager.Instance.PlayBGM("bgm_Main"); |                         SoundManager.Instance.PlayBGM("bgm_Main"); | ||||||
|                         brotherFertilizerAnimation.EndAnimation(); |                         brotherFertilizerAnimation.EndAnimation(); | ||||||
|  |                         fertilizerEffectView.SetActive(false); | ||||||
|                         SetCornField(); |                         SetCornField(); | ||||||
|                         resetFertilizerTimer.OnNext((int)DateTime.FromBinary(gameData.fertilizerTime).Subtract(DateTime.UtcNow).TotalSeconds); |                         resetFertilizerTimer.OnNext((int)DateTime.FromBinary(gameData.fertilizerTime).Subtract(DateTime.UtcNow).TotalSeconds); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -0,0 +1,23 @@ | ||||||
|  | using UnityEngine; | ||||||
|  | 
 | ||||||
|  | namespace MyGame.Scenes.CornField.Scripts | ||||||
|  | { | ||||||
|  |     public class FertilizerEffectView : MonoBehaviour | ||||||
|  |     { | ||||||
|  |         [SerializeField] private GameObject feverFrontLight; | ||||||
|  |         [SerializeField] private GameObject feverBackLight; | ||||||
|  |         [SerializeField] private Animator soilTopLightAnimator; | ||||||
|  |         [SerializeField] private Animator soilCenterLightAnimator; | ||||||
|  |         [SerializeField] private Animator soilBottomLightAnimator; | ||||||
|  |         private static readonly int HashSoilLight = Animator.StringToHash("Base Layer.SoilLight"); | ||||||
|  |         private static readonly int HashWait = Animator.StringToHash("Base Layer.Wait"); | ||||||
|  |          | ||||||
|  |         public void SetActive(bool active){ | ||||||
|  |             feverFrontLight.SetActive(active); | ||||||
|  |             feverBackLight.SetActive(active); | ||||||
|  |             soilTopLightAnimator.Play(active ? HashSoilLight : HashWait); | ||||||
|  |             soilCenterLightAnimator.Play(active ? HashSoilLight : HashWait); | ||||||
|  |             soilBottomLightAnimator.Play(active ? HashSoilLight : HashWait); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | @ -0,0 +1,3 @@ | ||||||
|  | fileFormatVersion: 2 | ||||||
|  | guid: 215e80c98433449a8e6afde20d84500b | ||||||
|  | timeCreated: 1638938050 | ||||||
		Loading…
	
		Reference in New Issue