演出タイミングの調整
This commit is contained in:
parent
5c24c05522
commit
a12794cfec
|
|
@ -25,6 +25,31 @@ AnimatorStateTransition:
|
||||||
m_InterruptionSource: 0
|
m_InterruptionSource: 0
|
||||||
m_OrderedInterruption: 1
|
m_OrderedInterruption: 1
|
||||||
m_CanTransitionToSelf: 1
|
m_CanTransitionToSelf: 1
|
||||||
|
--- !u!1101 &-8351496413139389895
|
||||||
|
AnimatorStateTransition:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name:
|
||||||
|
m_Conditions:
|
||||||
|
- m_ConditionMode: 1
|
||||||
|
m_ConditionEvent: CornWait
|
||||||
|
m_EventTreshold: 0
|
||||||
|
m_DstStateMachine: {fileID: 0}
|
||||||
|
m_DstState: {fileID: -6451913813719917424}
|
||||||
|
m_Solo: 0
|
||||||
|
m_Mute: 0
|
||||||
|
m_IsExit: 0
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TransitionDuration: 0
|
||||||
|
m_TransitionOffset: 0
|
||||||
|
m_ExitTime: 0.75
|
||||||
|
m_HasExitTime: 0
|
||||||
|
m_HasFixedDuration: 1
|
||||||
|
m_InterruptionSource: 0
|
||||||
|
m_OrderedInterruption: 1
|
||||||
|
m_CanTransitionToSelf: 1
|
||||||
--- !u!1101 &-8175191986188642306
|
--- !u!1101 &-8175191986188642306
|
||||||
AnimatorStateTransition:
|
AnimatorStateTransition:
|
||||||
m_ObjectHideFlags: 1
|
m_ObjectHideFlags: 1
|
||||||
|
|
@ -90,19 +115,25 @@ AnimatorController:
|
||||||
m_DefaultFloat: 0
|
m_DefaultFloat: 0
|
||||||
m_DefaultInt: 0
|
m_DefaultInt: 0
|
||||||
m_DefaultBool: 0
|
m_DefaultBool: 0
|
||||||
m_Controller: {fileID: 9100000}
|
m_Controller: {fileID: 0}
|
||||||
- m_Name: CornBurn
|
- m_Name: CornBurn
|
||||||
m_Type: 9
|
m_Type: 9
|
||||||
m_DefaultFloat: 0
|
m_DefaultFloat: 0
|
||||||
m_DefaultInt: 0
|
m_DefaultInt: 0
|
||||||
m_DefaultBool: 0
|
m_DefaultBool: 0
|
||||||
m_Controller: {fileID: 9100000}
|
m_Controller: {fileID: 0}
|
||||||
|
- m_Name: CornWait
|
||||||
|
m_Type: 9
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 0}
|
||||||
- m_Name: WaitOffset
|
- m_Name: WaitOffset
|
||||||
m_Type: 1
|
m_Type: 1
|
||||||
m_DefaultFloat: 0
|
m_DefaultFloat: 0
|
||||||
m_DefaultInt: 0
|
m_DefaultInt: 0
|
||||||
m_DefaultBool: 0
|
m_DefaultBool: 0
|
||||||
m_Controller: {fileID: 9100000}
|
m_Controller: {fileID: 0}
|
||||||
m_AnimatorLayers:
|
m_AnimatorLayers:
|
||||||
- serializedVersion: 5
|
- serializedVersion: 5
|
||||||
m_Name: Base Layer
|
m_Name: Base Layer
|
||||||
|
|
@ -127,17 +158,21 @@ AnimatorStateMachine:
|
||||||
m_ChildStates:
|
m_ChildStates:
|
||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: -6451913813719917424}
|
m_State: {fileID: -6451913813719917424}
|
||||||
m_Position: {x: 270, y: 40, z: 0}
|
m_Position: {x: 270, y: -20, z: 0}
|
||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: 6341160211334192665}
|
m_State: {fileID: 6341160211334192665}
|
||||||
m_Position: {x: 270, y: -100, z: 0}
|
m_Position: {x: 270, y: -100, z: 0}
|
||||||
- serializedVersion: 1
|
- serializedVersion: 1
|
||||||
m_State: {fileID: 7193984417312256253}
|
m_State: {fileID: 7193984417312256253}
|
||||||
m_Position: {x: 270, y: -190, z: 0}
|
m_Position: {x: 270, y: -190, z: 0}
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1339744208946830200}
|
||||||
|
m_Position: {x: 270, y: 60, z: 0}
|
||||||
m_ChildStateMachines: []
|
m_ChildStateMachines: []
|
||||||
m_AnyStateTransitions:
|
m_AnyStateTransitions:
|
||||||
- {fileID: -8175191986188642306}
|
- {fileID: -8175191986188642306}
|
||||||
- {fileID: -8797755764172867904}
|
- {fileID: -8797755764172867904}
|
||||||
|
- {fileID: -8351496413139389895}
|
||||||
m_EntryTransitions: []
|
m_EntryTransitions: []
|
||||||
m_StateMachineTransitions: {}
|
m_StateMachineTransitions: {}
|
||||||
m_StateMachineBehaviours: []
|
m_StateMachineBehaviours: []
|
||||||
|
|
@ -145,7 +180,33 @@ AnimatorStateMachine:
|
||||||
m_EntryPosition: {x: 40, y: 40, z: 0}
|
m_EntryPosition: {x: 40, y: 40, z: 0}
|
||||||
m_ExitPosition: {x: 550, y: 50, z: 0}
|
m_ExitPosition: {x: 550, y: 50, z: 0}
|
||||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
m_DefaultState: {fileID: -6451913813719917424}
|
m_DefaultState: {fileID: 1339744208946830200}
|
||||||
|
--- !u!1102 &1339744208946830200
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: CornStill
|
||||||
|
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_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 0}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
--- !u!1102 &6341160211334192665
|
--- !u!1102 &6341160211334192665
|
||||||
AnimatorState:
|
AnimatorState:
|
||||||
serializedVersion: 5
|
serializedVersion: 5
|
||||||
|
|
|
||||||
|
|
@ -127,6 +127,12 @@ Transform:
|
||||||
type: 3}
|
type: 3}
|
||||||
m_PrefabInstance: {fileID: 1244643143}
|
m_PrefabInstance: {fileID: 1244643143}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!1 &158786353 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 6414470378191658949, guid: b6b05cbc51c744ac2ad95a8b229d4ddd,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 2137549891}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!1 &162168169
|
--- !u!1 &162168169
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -8948,6 +8954,7 @@ MonoBehaviour:
|
||||||
startingGuide: {fileID: 8786490829224139677}
|
startingGuide: {fileID: 8786490829224139677}
|
||||||
fire: {fileID: 1295632042}
|
fire: {fileID: 1295632042}
|
||||||
oilEffect: {fileID: 2137549893}
|
oilEffect: {fileID: 2137549893}
|
||||||
|
streamEffect: {fileID: 158786353}
|
||||||
characterSweat: {fileID: 580170368}
|
characterSweat: {fileID: 580170368}
|
||||||
characterFlower: {fileID: 785034261}
|
characterFlower: {fileID: 785034261}
|
||||||
--- !u!224 &1871878299 stripped
|
--- !u!224 &1871878299 stripped
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ public enum CornCondition
|
||||||
[RequireComponent(typeof(Rigidbody2D))]
|
[RequireComponent(typeof(Rigidbody2D))]
|
||||||
public class Corn : MonoBehaviour
|
public class Corn : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
private static readonly int HashCornWait = Animator.StringToHash("CornWait");
|
||||||
private static readonly int HashCornGrow = Animator.StringToHash("CornGrow");
|
private static readonly int HashCornGrow = Animator.StringToHash("CornGrow");
|
||||||
private static readonly int HashCornBurn = Animator.StringToHash("CornBurn");
|
private static readonly int HashCornBurn = Animator.StringToHash("CornBurn");
|
||||||
private static readonly int HashWaitOffset = Animator.StringToHash("WaitOffset");
|
private static readonly int HashWaitOffset = Animator.StringToHash("WaitOffset");
|
||||||
|
|
@ -171,4 +172,9 @@ public class Corn : MonoBehaviour
|
||||||
{
|
{
|
||||||
isHot = status;
|
isHot = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void StartCornDance()
|
||||||
|
{
|
||||||
|
animator.SetTrigger(HashCornWait);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,9 @@ public class CornManager : MonoBehaviour
|
||||||
|
|
||||||
public IReadOnlyReactiveProperty<CornResult> Result => result;
|
public IReadOnlyReactiveProperty<CornResult> Result => result;
|
||||||
private readonly ReactiveProperty<CornResult> result = new ReactiveProperty<CornResult>();
|
private readonly ReactiveProperty<CornResult> result = new ReactiveProperty<CornResult>();
|
||||||
|
|
||||||
|
public ReactiveProperty<GameState> GameState => gameState;
|
||||||
|
private readonly ReactiveProperty<GameState> gameState = new ReactiveProperty<GameState>();
|
||||||
|
|
||||||
private Corn[] cornArray;
|
private Corn[] cornArray;
|
||||||
private bool isHot;
|
private bool isHot;
|
||||||
|
|
@ -149,6 +152,13 @@ public class CornManager : MonoBehaviour
|
||||||
corn.ChangeGrowSpeed(x);
|
corn.ChangeGrowSpeed(x);
|
||||||
corn.ChangeHotStatus(isHot);
|
corn.ChangeHotStatus(isHot);
|
||||||
}).AddTo(compositeDisposable);
|
}).AddTo(compositeDisposable);
|
||||||
|
|
||||||
|
gameState
|
||||||
|
.Where(x => x == global::GameState.Playing)
|
||||||
|
.Subscribe(x =>
|
||||||
|
{
|
||||||
|
corn.StartCornDance();
|
||||||
|
}).AddTo(compositeDisposable);
|
||||||
|
|
||||||
|
|
||||||
corn.Condition
|
corn.Condition
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,8 @@ public class PopcornGameManager : MonoBehaviour
|
||||||
gameView.ChangeCharactorState(x);
|
gameView.ChangeCharactorState(x);
|
||||||
}).AddTo(this);
|
}).AddTo(this);
|
||||||
|
|
||||||
|
state.Subscribe(x => cornManager.GameState.Value = x);
|
||||||
|
|
||||||
ResetGame();
|
ResetGame();
|
||||||
|
|
||||||
#if DEVELOPMENT_BUILD || UNITY_EDITOR
|
#if DEVELOPMENT_BUILD || UNITY_EDITOR
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ public class PopcornGameView : MonoBehaviour
|
||||||
[SerializeField] private GameObject startingGuide;
|
[SerializeField] private GameObject startingGuide;
|
||||||
[SerializeField] private GameObject fire;
|
[SerializeField] private GameObject fire;
|
||||||
[SerializeField] private GameObject oilEffect;
|
[SerializeField] private GameObject oilEffect;
|
||||||
|
[SerializeField] private GameObject streamEffect;
|
||||||
[SerializeField] private GameObject characterSweat;
|
[SerializeField] private GameObject characterSweat;
|
||||||
[SerializeField] private GameObject characterFlower;
|
[SerializeField] private GameObject characterFlower;
|
||||||
|
|
||||||
|
|
@ -25,6 +26,7 @@ public class PopcornGameView : MonoBehaviour
|
||||||
{
|
{
|
||||||
fire.SetActive(isActive);
|
fire.SetActive(isActive);
|
||||||
oilEffect.SetActive(isActive);
|
oilEffect.SetActive(isActive);
|
||||||
|
streamEffect.SetActive(isActive);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ChangeCharactorState(ThermalCondition condition)
|
public void ChangeCharactorState(ThermalCondition condition)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue