Merge branch 'develop' of bitbucket.org:usaya/popcorn into develop
# Conflicts: # popcorn/Assets/MyGame/Scenes/Cooking/Cooking.unity
This commit is contained in:
commit
9ff151d94c
|
|
@ -136,7 +136,7 @@ GameObject:
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 1
|
m_IsActive: 0
|
||||||
--- !u!4 &70623621
|
--- !u!4 &70623621
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -8259,12 +8259,12 @@ MonoBehaviour:
|
||||||
temperature: 0
|
temperature: 0
|
||||||
temperatureSpeed: 0
|
temperatureSpeed: 0
|
||||||
panSpeed: 0
|
panSpeed: 0
|
||||||
panFactor: 0.5
|
panFactor: 0.18
|
||||||
deadZone: 0.01
|
deadZone: 0.05
|
||||||
baseIncreaseSpeed: 0.06
|
baseIncreaseSpeed: 0.12
|
||||||
hotIncreaseSpeed: 0.09
|
hotIncreaseSpeed: 0.16
|
||||||
maxDecreaseSpeed: 0.09
|
maxDecreaseSpeed: 0.07
|
||||||
coldValue: 0.32
|
coldValue: 0.26
|
||||||
hotValue: 0.67
|
hotValue: 0.67
|
||||||
--- !u!114 &1870432536
|
--- !u!114 &1870432536
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
|
|
@ -8281,12 +8281,14 @@ MonoBehaviour:
|
||||||
cornSpawnTarget: {fileID: 1440136003}
|
cornSpawnTarget: {fileID: 1440136003}
|
||||||
cornPrefab: {fileID: 5499754490129207122, guid: 2b790fd908bd14de4a601c21374fb55b,
|
cornPrefab: {fileID: 5499754490129207122, guid: 2b790fd908bd14de4a601c21374fb55b,
|
||||||
type: 3}
|
type: 3}
|
||||||
cornSpawnCount: 20
|
cornSpawnCount: 120
|
||||||
maxFailedCornCount: 10
|
maxFailedCornCount: 70
|
||||||
baseGrowSpeed: 1
|
baseGrowSpeed: 1
|
||||||
hotGrowSpeed: 1.5
|
hotGrowSpeed: 1.4
|
||||||
baseCornPopTime: 10
|
baseCornPopTime: 10
|
||||||
cornBurntDuration: 1
|
cornBurntDuration: 1
|
||||||
|
cornSpillSpeed: 50
|
||||||
|
cornPopSpeed: 30
|
||||||
--- !u!1 &1928679189
|
--- !u!1 &1928679189
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@ CircleCollider2D:
|
||||||
m_UsedByComposite: 0
|
m_UsedByComposite: 0
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Radius: 0.21
|
m_Radius: 0.16
|
||||||
--- !u!1 &3431194784518736845
|
--- !u!1 &3431194784518736845
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,8 @@ public class Corn : MonoBehaviour
|
||||||
private float cornBurntTime;
|
private float cornBurntTime;
|
||||||
private float cornGrowTime;
|
private float cornGrowTime;
|
||||||
private float cornGrowSpeed;
|
private float cornGrowSpeed;
|
||||||
private float maxSpeed = 50f;
|
private float cornSpillSpeed;
|
||||||
private float popSpeed = 20f;
|
private float cornPopSpeed;
|
||||||
|
|
||||||
public IReadOnlyReactiveProperty<CornCondition> Condition => condition;
|
public IReadOnlyReactiveProperty<CornCondition> Condition => condition;
|
||||||
private readonly ReactiveProperty<CornCondition> condition = new ReactiveProperty<CornCondition>(CornCondition.Seed);
|
private readonly ReactiveProperty<CornCondition> condition = new ReactiveProperty<CornCondition>(CornCondition.Seed);
|
||||||
|
|
@ -59,7 +59,7 @@ public class Corn : MonoBehaviour
|
||||||
|
|
||||||
// コーンが飛んでいく
|
// コーンが飛んでいく
|
||||||
this.ObserveEveryValueChanged(x => x.rigidbody.velocity.magnitude)
|
this.ObserveEveryValueChanged(x => x.rigidbody.velocity.magnitude)
|
||||||
.Where(x => x >= maxSpeed)
|
.Where(x => x >= cornSpillSpeed)
|
||||||
.FirstOrDefault()
|
.FirstOrDefault()
|
||||||
.Subscribe(_ =>
|
.Subscribe(_ =>
|
||||||
{
|
{
|
||||||
|
|
@ -116,7 +116,7 @@ public class Corn : MonoBehaviour
|
||||||
private void CornPop()
|
private void CornPop()
|
||||||
{
|
{
|
||||||
spriteRenderer.sprite = cornSimpleSprite;
|
spriteRenderer.sprite = cornSimpleSprite;
|
||||||
rigidbody.AddForce(popSpeed * new Vector2(Random.value * 2 - 1, Random.value * 2 - 1), ForceMode2D.Impulse);
|
rigidbody.AddForce(cornPopSpeed * new Vector2(Random.value * 2 - 1, Random.value * 2 - 1), ForceMode2D.Impulse);
|
||||||
animator.SetTrigger(HashCornGrow);
|
animator.SetTrigger(HashCornGrow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -132,10 +132,12 @@ public class Corn : MonoBehaviour
|
||||||
GetComponent<Collider2D>().enabled = false;
|
GetComponent<Collider2D>().enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetCornProperty(float popTime, float burntDuration)
|
public void SetCornProperty(float popTime, float burntDuration, float spillSpeed, float popSpeed)
|
||||||
{
|
{
|
||||||
cornPopTime = popTime + Random.Range(0, 2f);
|
cornPopTime = popTime + Random.Range(0, 2f);
|
||||||
cornBurntTime = cornPopTime + burntDuration + Random.Range(0, 1f);
|
cornBurntTime = cornPopTime + burntDuration + Random.Range(0, 1f);
|
||||||
|
cornSpillSpeed = spillSpeed;
|
||||||
|
cornPopSpeed = popSpeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ChangeGrowSpeed(float speed)
|
public void ChangeGrowSpeed(float speed)
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,8 @@ public class CornManager : MonoBehaviour
|
||||||
[SerializeField] private float hotGrowSpeed;
|
[SerializeField] private float hotGrowSpeed;
|
||||||
[SerializeField] private float baseCornPopTime = 5f;
|
[SerializeField] private float baseCornPopTime = 5f;
|
||||||
[SerializeField] private float cornBurntDuration = 5f;
|
[SerializeField] private float cornBurntDuration = 5f;
|
||||||
|
[SerializeField] private float cornSpillSpeed = 50f;
|
||||||
|
[SerializeField] private float cornPopSpeed = 20f;
|
||||||
|
|
||||||
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>();
|
||||||
|
|
@ -62,7 +64,7 @@ public class CornManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
var corn = Instantiate(cornPrefab, cornSpawnTarget);
|
var corn = Instantiate(cornPrefab, cornSpawnTarget);
|
||||||
cornArray[i] = corn;
|
cornArray[i] = corn;
|
||||||
corn.SetCornProperty(baseCornPopTime, cornBurntDuration);
|
corn.SetCornProperty(baseCornPopTime, cornBurntDuration, cornSpillSpeed, cornPopSpeed);
|
||||||
|
|
||||||
// 進行速度の変更時、コーン速度変更
|
// 進行速度の変更時、コーン速度変更
|
||||||
cornGrowSpeed.TakeWhile(_ => !isCompleted).Subscribe(x =>
|
cornGrowSpeed.TakeWhile(_ => !isCompleted).Subscribe(x =>
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,7 @@ public class ThermalControl : MonoBehaviour
|
||||||
public void ResetMeter()
|
public void ResetMeter()
|
||||||
{
|
{
|
||||||
temperature = 0f;
|
temperature = 0f;
|
||||||
|
thermoMeter.SetValue(temperature);
|
||||||
temperatureSpeed = 0f;
|
temperatureSpeed = 0f;
|
||||||
thermoMeter.SetScale(coldValue, hotValue);
|
thermoMeter.SetScale(coldValue, hotValue);
|
||||||
panController.ResetTargetPosition();
|
panController.ResetTargetPosition();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue