Commit 1f6ff3b9 authored by wanqing's avatar wanqing

修改预制体

parent 28a75653
This diff is collapsed.
This diff is collapsed.
......@@ -165,7 +165,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
levelPrefs:
- {fileID: 1411365057041450796, guid: 4c183562b13ee4f419e4c58c74ca5ae7, type: 3}
- {fileID: 8407641946231363095, guid: 151674a7e2ae82d40b0e83586cbc8082, type: 3}
- {fileID: 8844811367371711361, guid: 4e82526948e0052488262b6410156ade, type: 3}
--- !u!1 &543166196
GameObject:
......@@ -278,7 +278,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: eac3ab1cd8d56dc4fb10ca3966649e25, type: 3}
m_Name:
m_EditorClassIdentifier:
battleUI: {fileID: 6598198701804661606}
battleUI: {fileID: 2347244092073185524}
m_levelManager: {fileID: 186647396}
--- !u!1 &1872965180
GameObject:
......@@ -324,7 +324,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 65d718b4fac224944ad7728793e3fdc7, type: 3}
m_Name:
m_EditorClassIdentifier:
pad: {fileID: 6598198702626774329}
pad: {fileID: 2347244091251205803}
--- !u!114 &1872965183
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -337,31 +337,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: ff376a18ea419e546ba78667f1b5c6b3, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &6598198701804661606 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 6064464677632144694, guid: 919382978f5e2684ba83e6daf6491458,
type: 3}
m_PrefabInstance: {fileID: 8411132485852915138}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 719c0ad6d83af074a83455f6c88d41e0, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &6598198702626774329 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 6064464676810081129, guid: 919382978f5e2684ba83e6daf6491458,
type: 3}
m_PrefabInstance: {fileID: 8411132485852915138}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e3ca8d9f66bfdf4da1bfb54682c658b, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &8411132485852915138
--- !u!1001 &1598298138395560401
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
......@@ -480,3 +456,27 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 919382978f5e2684ba83e6daf6491458, type: 3}
--- !u!114 &2347244091251205803 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 6064464676810081129, guid: 919382978f5e2684ba83e6daf6491458,
type: 3}
m_PrefabInstance: {fileID: 1598298138395560401}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e3ca8d9f66bfdf4da1bfb54682c658b, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &2347244092073185524 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 6064464677632144694, guid: 919382978f5e2684ba83e6daf6491458,
type: 3}
m_PrefabInstance: {fileID: 1598298138395560401}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 719c0ad6d83af074a83455f6c88d41e0, type: 3}
m_Name:
m_EditorClassIdentifier:
......@@ -52,6 +52,8 @@ public class BattleUI : MonoBehaviour
private bool m_bIsShowMouse = true;//是否显示手指图标
private int m_bombIndex = 0;//炸弹计数
private bool m_bResult = false;//结果
private bool m_bIsDebug = false;//是否开启调试模式
public bool isDebug => m_bIsDebug;
public bool IsLeftEmtryBomb { get { return m_bombIndex >= 3; } }//是否不剩炸弹了
public bool IsBombButtonCanInteractable { get { return m_boomBtn.interactable; } }
void Awake()
......@@ -264,6 +266,7 @@ public class BattleUI : MonoBehaviour
//设置战斗UI状态
public void SetBattleObjState(bool bool_)
{
m_bIsDebug = !bool_;
m_battleObj.SetActive(bool_);
//m_successResultObj.SetActive(bool_);
//m_successResultMaskObj.SetActive(!bool_);
......@@ -345,6 +348,7 @@ public class BattleUI : MonoBehaviour
}
varView.SetResultAnimator(varView.hitTopBoxNum <= 0);
}
SetTakeBtnState(false);
}
//设置take按钮状态
public void SetTakeBtnState(bool value)
......
......@@ -162,8 +162,15 @@ public class StorageView : MonoBehaviour
for (int i = 0; i < m_targetTrans.Length; i++)
{
if (string.Equals(m_targetTrans[i].name, name))
{
if(BattleCtrl.instance.battleUI.isDebug)
{
m_targetTrans[i].GetComponent<MeshRenderer>().sharedMaterial = m_redMat;
}
else
{
m_targetTrans[i].GetComponent<MeshRenderer>().sharedMaterial = m_dicMat[m_targetTrans[i]]; ;
}
m_hitTopBoxNum++;
break;
}
......@@ -230,7 +237,12 @@ public class StorageView : MonoBehaviour
m_fixedRigidBody[i].isKinematic = false;
}
}
if(value)
for (int i = 0; i < m_targetTrans.Length; i++)
{
m_targetTrans[i].GetComponent<Rigidbody>().constraints = RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationY
| RigidbodyConstraints.FreezeRotationZ;
}
if (value)
{
//for (int i = 0; i < m_targetTrans.Length; i++)
//{
......@@ -257,6 +269,10 @@ public class StorageView : MonoBehaviour
}
if (Input.GetMouseButton(0))
{
Vector3 varVec3 = Input.mousePosition;
varVec3.x = (varVec3.x - Screen.width / 2f) / (Screen.width / GlobalConfig.NormalWidth) + 100;
varVec3.y = (varVec3.y - Screen.height / 2f) / (Screen.width / GlobalConfig.NormalWidth) - 100;
BattleCtrl.instance.battleUI.SetMousePos(varVec3.x, varVec3.y);
if (m_curTargetTrans)
{
//if (m_dicInsideCollisonBox.ContainsKey(m_curTargetTrans) && !m_dicInsideCollisonBox[m_curTargetTrans])
......@@ -279,6 +295,10 @@ public class StorageView : MonoBehaviour
}
}
}
else if (Input.GetMouseButtonUp(0))
{
BattleCtrl.instance.battleUI.SetMousePos(0, 0);
}
//确保最低位置
if (m_curTargetTrans)
{
......@@ -470,6 +490,7 @@ public class StorageView : MonoBehaviour
m_curTargetTrans = m_targetTrans[i];
Rigidbody varBody = m_curTargetTrans.GetComponent<Rigidbody>();
varBody.isKinematic = true;
//varBody.collisionDetectionMode = CollisionDetectionMode.Discrete;
varBody.constraints = RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationY
| RigidbodyConstraints.FreezeRotationZ;
Quaternion varQua = m_curTargetTrans.transform.rotation;
......
This diff is collapsed.
......@@ -587,7 +587,7 @@ AnimationClip:
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopTime: 0
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
......
......@@ -631,7 +631,7 @@ AnimationClip:
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopTime: 0
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
......
......@@ -10214,8 +10214,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4096712623974059868}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1.3, z: -0.46}
m_LocalScale: {x: 4, y: 0.1, z: 4}
m_LocalPosition: {x: 0, y: 1.339, z: -0.46}
m_LocalScale: {x: 3, y: 0.01, z: 3}
m_Children: []
m_Father: {fileID: 7609197319393572573}
m_RootOrder: 1
......
......@@ -357,8 +357,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1864293459122168787}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1.3, z: -0.46}
m_LocalScale: {x: 4, y: 0.1, z: 4}
m_LocalPosition: {x: 0, y: 1.339, z: -0.46}
m_LocalScale: {x: 4, y: 0.01, z: 4}
m_Children: []
m_Father: {fileID: 49667949129306736}
m_RootOrder: 1
......
This diff is collapsed.
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