Commit b735309e authored by wanqing's avatar wanqing

修改脚本

parent 63c6947b
...@@ -1052,6 +1052,8 @@ public class BattleUI : MonoBehaviour ...@@ -1052,6 +1052,8 @@ public class BattleUI : MonoBehaviour
//选择场景镜头 //选择场景镜头
BattleCtrl.instance.levelManager.curLevel.fruitView.SetCupWaterPos(); BattleCtrl.instance.levelManager.curLevel.fruitView.SetCupWaterPos();
//BattleCtrl.instance.levelManager.selectLevel.SetCameraPosAndRotation(); //BattleCtrl.instance.levelManager.selectLevel.SetCameraPosAndRotation();
//设置奶酪位置
BattleCtrl.instance.levelManager.curLevel.fruitView.SetCheesePosAndRotation();
} }
} }
else else
......
...@@ -11,6 +11,8 @@ public class CheeseView : MonoBehaviour ...@@ -11,6 +11,8 @@ public class CheeseView : MonoBehaviour
public Transform m_rotateTarget; public Transform m_rotateTarget;
public Transform m_cheeseTrans; public Transform m_cheeseTrans;
public Transform m_capsuleTrans; public Transform m_capsuleTrans;
public Transform m_iceCreeamTrans;
public IceCreamDropper m_iceCreamDropper;
//撒葱花 //撒葱花
public Transform m_rigidParent; public Transform m_rigidParent;
...@@ -60,6 +62,12 @@ public class CheeseView : MonoBehaviour ...@@ -60,6 +62,12 @@ public class CheeseView : MonoBehaviour
private Vector3 m_mouseStartPos; private Vector3 m_mouseStartPos;
private Transform m_curSelectProp; private Transform m_curSelectProp;
//主界面奶酪位置和旋转
private Vector3 m_iceCreamPos = new Vector3(-0.346f, -0.307f, 0.496f);
private Quaternion m_iceCreamQua = Quaternion.Euler(-10.0f, 0, 0);
private Color m_iceCreamColor = new Color(231.0f / 255.0f, 202.0f / 255.0f, 202.0f / 255.0f, 241.0f / 255.0f);
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
{ {
...@@ -126,10 +134,9 @@ public class CheeseView : MonoBehaviour ...@@ -126,10 +134,9 @@ public class CheeseView : MonoBehaviour
//阶段1开始 //阶段1开始
public void StartStage1(float progress) public void StartStage1(float progress)
{ {
Color varColor = new Color(231.0f/255.0f,202.0f/255.0f,202.0f/255.0f,241.0f/255.0f); //IceCreamDropper iceCreamDropper = FindObjectOfType<IceCreamDropper>();
IceCreamDropper iceCreamDropper = FindObjectOfType<IceCreamDropper>();
iceCreamDropper.MakeCream(varColor); m_iceCreamDropper.MakeCream(m_iceCreamColor);
//GameManager.Instance.SetCreamMachineState(true); //GameManager.Instance.SetCreamMachineState(true);
//capsule变化 //capsule变化
//Vector3 varCap = m_capsuleTrans.localScale; //Vector3 varCap = m_capsuleTrans.localScale;
...@@ -243,6 +250,12 @@ public class CheeseView : MonoBehaviour ...@@ -243,6 +250,12 @@ public class CheeseView : MonoBehaviour
m_prop3Trans.gameObject.SetActive(true); m_prop3Trans.gameObject.SetActive(true);
m_curSelectProp = m_prop3Trans; m_curSelectProp = m_prop3Trans;
} }
//设置奶酪位置和旋转
public void SetCheesePosAndRotation()
{
m_iceCreeamTrans.localPosition = m_iceCreamPos;
m_iceCreeamTrans.localRotation = m_iceCreamQua;
}
//移动 //移动
void MoveRigid() void MoveRigid()
{ {
......
...@@ -1426,6 +1426,14 @@ public class FruitView : MonoBehaviour ...@@ -1426,6 +1426,14 @@ public class FruitView : MonoBehaviour
Destroy(m_cheeseView.gameObject); Destroy(m_cheeseView.gameObject);
} }
} }
//设置奶酪状态
public void SetCheesePosAndRotation()
{
if (m_cheeseView)
{
m_cheeseView.SetCheesePosAndRotation();
}
}
void UpdateKnife() void UpdateKnife()
{ {
m_knifeTrans.gameObject.SetActive(true); m_knifeTrans.gameObject.SetActive(true);
......
...@@ -1106,6 +1106,8 @@ MonoBehaviour: ...@@ -1106,6 +1106,8 @@ MonoBehaviour:
m_rotateTarget: {fileID: 4879173884299230714} m_rotateTarget: {fileID: 4879173884299230714}
m_cheeseTrans: {fileID: 4694249925469357091} m_cheeseTrans: {fileID: 4694249925469357091}
m_capsuleTrans: {fileID: 0} m_capsuleTrans: {fileID: 0}
m_iceCreeamTrans: {fileID: 1276888170468845636}
m_iceCreamDropper: {fileID: 1276888170235659685}
m_rigidParent: {fileID: 4585988333531155165} m_rigidParent: {fileID: 4585988333531155165}
m_moveTrans: {fileID: 2207552765813870026} m_moveTrans: {fileID: 2207552765813870026}
m_movePint: m_movePint:
...@@ -2958,18 +2960,18 @@ PrefabInstance: ...@@ -2958,18 +2960,18 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f3b290a90429562469281f9556527a8c, type: 3} m_SourcePrefab: {fileID: 100100000, guid: f3b290a90429562469281f9556527a8c, type: 3}
--- !u!4 &4694249925469357091 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -4216859302048453862, guid: f3b290a90429562469281f9556527a8c,
type: 3}
m_PrefabInstance: {fileID: 315225178136702777}
m_PrefabAsset: {fileID: 0}
--- !u!1 &8610331320571639344 stripped --- !u!1 &8610331320571639344 stripped
GameObject: GameObject:
m_CorrespondingSourceObject: {fileID: -927199367670048503, guid: f3b290a90429562469281f9556527a8c, m_CorrespondingSourceObject: {fileID: -927199367670048503, guid: f3b290a90429562469281f9556527a8c,
type: 3} type: 3}
m_PrefabInstance: {fileID: 315225178136702777} m_PrefabInstance: {fileID: 315225178136702777}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!4 &4694249925469357091 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -4216859302048453862, guid: f3b290a90429562469281f9556527a8c,
type: 3}
m_PrefabInstance: {fileID: 315225178136702777}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1065180048189040686 --- !u!1001 &1065180048189040686
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -3104,18 +3106,36 @@ PrefabInstance: ...@@ -3104,18 +3106,36 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: bd4fd7815fb1baf4e95672fab6073172, type: 3} m_SourcePrefab: {fileID: 100100000, guid: bd4fd7815fb1baf4e95672fab6073172, type: 3}
--- !u!4 &7642210446671379423 stripped --- !u!114 &1276888170235659685 stripped
Transform: MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 7261722849243845617, guid: bd4fd7815fb1baf4e95672fab6073172, m_CorrespondingSourceObject: {fileID: 2265359655573106059, guid: bd4fd7815fb1baf4e95672fab6073172,
type: 3} type: 3}
m_PrefabInstance: {fileID: 1065180048189040686} m_PrefabInstance: {fileID: 1065180048189040686}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 25175d7c42ff346d490e5ab3895eab07, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &8935024947585835429 stripped --- !u!4 &8935024947585835429 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: 8446450822740396427, guid: bd4fd7815fb1baf4e95672fab6073172, m_CorrespondingSourceObject: {fileID: 8446450822740396427, guid: bd4fd7815fb1baf4e95672fab6073172,
type: 3} type: 3}
m_PrefabInstance: {fileID: 1065180048189040686} m_PrefabInstance: {fileID: 1065180048189040686}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!4 &1276888170468845636 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2265359655198097514, guid: bd4fd7815fb1baf4e95672fab6073172,
type: 3}
m_PrefabInstance: {fileID: 1065180048189040686}
m_PrefabAsset: {fileID: 0}
--- !u!4 &7642210446671379423 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 7261722849243845617, guid: bd4fd7815fb1baf4e95672fab6073172,
type: 3}
m_PrefabInstance: {fileID: 1065180048189040686}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &6618172993386178256 --- !u!1001 &6618172993386178256
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
...@@ -10,7 +10,7 @@ public class IceCreamDropper : MonoBehaviour ...@@ -10,7 +10,7 @@ public class IceCreamDropper : MonoBehaviour
public Transform m_clubTrans; public Transform m_clubTrans;
float initialElevation = 2; float initialElevation = 2;
float maxElevation = 4; float maxElevation = 4;
float rotationSpeed = 7f; float rotationSpeed = 10f;
float rotationDuration = 6; float rotationDuration = 6;
float t; float t;
float angle; float angle;
......
...@@ -21,7 +21,7 @@ public class LevelManager : MonoBehaviour ...@@ -21,7 +21,7 @@ public class LevelManager : MonoBehaviour
{ {
// Load the current level // Load the current level
//LEVEL = PlayerPrefs.GetInt("LEVEL"); //LEVEL = PlayerPrefs.GetInt("LEVEL");
LEVEL = BattleCtrl.instance.levelManager.CurLevelIndex; LEVEL = 3;
} }
public static void IncreaseLevel() public static void IncreaseLevel()
......
...@@ -35104,7 +35104,7 @@ GameObject: ...@@ -35104,7 +35104,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 0 m_IsActive: 1
--- !u!4 &1407519428018055708 --- !u!4 &1407519428018055708
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment