Commit 8dec1437 authored by xujr's avatar xujr

Merge remote-tracking branch 'origin/master' into xjr

# Conflicts:
#	BoomMaster/Assets/#A3_Prefabs/BattleUI.prefab
parents aa0011f0 96d8acd9
......@@ -89,6 +89,7 @@
<Compile Include="Assets\#A2_Scripts\Battle\UI\SelectLevelUI.cs" />
<Compile Include="Assets\#A2_Scripts\Battle\UI\SettingPanel.cs" />
<Compile Include="Assets\#A2_Scripts\Battle\UI\TestGestureAround.cs" />
<Compile Include="Assets\#A2_Scripts\Battle\View\BombState1View.cs" />
<Compile Include="Assets\#A2_Scripts\Battle\View\BombStateView.cs" />
<Compile Include="Assets\#A2_Scripts\Battle\View\BombView.cs" />
<Compile Include="Assets\#A2_Scripts\Battle\View\ChainDragView.cs" />
......
......@@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.37311992, g: 0.38074034, b: 0.35872713, a: 1}
m_IndirectSpecularColor: {r: 0.37311926, g: 0.38073996, b: 0.35872698, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &4
LightmapSettings:
......@@ -171,7 +171,6 @@ MonoBehaviour:
- {fileID: 945570835972455969, guid: af2db092e9ac9a24b81ec302ad910588, type: 3}
- {fileID: 4014335436679012073, guid: 16d73164b8f5c7744892dd5fa4284980, type: 3}
- {fileID: 4176077394338190956, guid: 96ed4cec24368ce4bbc8b31c32895485, type: 3}
- {fileID: 916316864684617039, guid: ae5208ef0dc122d4db2463688f2bbb7b, type: 3}
--- !u!1 &543166196
GameObject:
m_ObjectHideFlags: 0
......@@ -283,7 +282,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: eac3ab1cd8d56dc4fb10ca3966649e25, type: 3}
m_Name:
m_EditorClassIdentifier:
battleUI: {fileID: 6833933616594028096}
battleUI: {fileID: 8593838211060038329}
m_levelManager: {fileID: 186647396}
--- !u!1 &1872965180
GameObject:
......@@ -330,7 +329,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 65d718b4fac224944ad7728793e3fdc7, type: 3}
m_Name:
m_EditorClassIdentifier:
pad: {fileID: 6833933617919537183}
pad: {fileID: 8593838212385393894}
--- !u!114 &1872965183
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -359,7 +358,7 @@ MonoBehaviour:
type: 3}
m_rayfireBombObj: {fileID: 7079061562166580387, guid: 4a54442bb4207004c9595cc36ec83f59,
type: 3}
--- !u!1001 &2551918300351401871
--- !u!1001 &6445015490357435694
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
......@@ -478,11 +477,11 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 919382978f5e2684ba83e6daf6491458, type: 3}
--- !u!114 &6833933616594028096 stripped
--- !u!114 &8593838211060038329 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 6064464677632144694, guid: 919382978f5e2684ba83e6daf6491458,
type: 3}
m_PrefabInstance: {fileID: 2551918300351401871}
m_PrefabInstance: {fileID: 6445015490357435694}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
......@@ -490,11 +489,11 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 719c0ad6d83af074a83455f6c88d41e0, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &6833933617919537183 stripped
--- !u!114 &8593838212385393894 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 6064464676810081129, guid: 919382978f5e2684ba83e6daf6491458,
type: 3}
m_PrefabInstance: {fileID: 2551918300351401871}
m_PrefabInstance: {fileID: 6445015490357435694}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
......
......@@ -94,9 +94,8 @@ public class BattleCtrl : MonoBehaviour
/// </summary>
void StartBattle()
{
_IsStartBattle = true;
Invoke("DelayHandle", 0.1f);
//if (curLevel.curLevelIndex == 0)//第一关,记录玩家选择的pien
//{
// GlobalData.roleSelectData = homeUI.GetRoleSelectData();
......@@ -105,6 +104,10 @@ public class BattleCtrl : MonoBehaviour
//curLevel.OnStartBattle();
}
void DelayHandle()
{
_IsStartBattle = true;
}
/// <summary>
/// 战斗失败回调
......
......@@ -79,6 +79,7 @@ public class BattleUI : MonoBehaviour
public bool IsBombDouble { get { return m_isBombDouble; } }//是否double
public bool IsLeftEmtryBomb { get { return m_bombIndex >= 3; } }//是否不剩炸弹了
public bool IsBombButtonCanInteractable { get { return m_boomBtn.interactable; } }
public bool IsActivitySelectLevelUi { get { return m_selectLevelObj.activeSelf; } }
void Awake()
{
m_dragBtn.onClick.AddListener(SetDragMode);
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class PropSelectUI : MonoBehaviour
{
......@@ -10,20 +11,61 @@ public class PropSelectUI : MonoBehaviour
public GameObject m_strengthSymbolObj;
public GameObject m_doubleSymbolObj;
public GameObject m_coinSymbolObj;
public GameObject m_strengthMaskObj;
public GameObject m_doubleMaskObj;
public GameObject m_coinMaskObj;
public Button m_strengthButton;
public Button m_doubleButton;
public Button m_coinButton;
private bool m_bIsBuyOne;
private bool m_bIsBuyTwo;
private bool m_bIsBuyThree;
private void Awake()
{
m_strengthButton = m_strengthObj.GetComponent<Button>();
m_doubleButton = m_doubleObj.GetComponent<Button>();
m_coinButton = m_coinObj.GetComponent<Button>();
}
public void Show()
{
gameObject.SetActive(true);
int varCoin = LocalRecord.GetIntRecord(GlobalConfig.CoinReCordKey);
m_strengthObj.SetActive(varCoin >= 10);
m_doubleObj.SetActive(varCoin >= 20);
m_coinObj.SetActive(varCoin >= 10);
m_strengthObj.SetActive(true);
m_doubleObj.SetActive(true);
m_coinObj.SetActive(true);
m_strengthMaskObj.SetActive(varCoin < 10);
m_doubleMaskObj.SetActive(varCoin < 20);
m_coinMaskObj.SetActive(varCoin < 10);
m_strengthSymbolObj.SetActive(false);
m_doubleSymbolObj.SetActive(false);
m_coinSymbolObj.SetActive(false);
if(m_strengthButton)
{
m_strengthButton.enabled = varCoin >= 10;
}
if(m_doubleButton)
{
m_doubleButton.enabled = varCoin >= 20;
}
if(m_coinButton)
{
m_coinButton.enabled = varCoin >= 10;
}
m_bIsBuyOne = false;
m_bIsBuyTwo = false;
m_bIsBuyThree = false;
}
public void SetState(bool value)
{
gameObject.SetActive(value);
int varCoin = LocalRecord.GetIntRecord(GlobalConfig.CoinReCordKey);
m_strengthMaskObj.SetActive(!value || varCoin < 10 || m_bIsBuyOne);
m_doubleMaskObj.SetActive(!value || varCoin < 20 || m_bIsBuyTwo);
m_coinMaskObj.SetActive(!value || varCoin < 10 || m_bIsBuyThree);
m_strengthButton.enabled = value && varCoin >= 10 && !m_bIsBuyOne;
m_doubleButton.enabled = value && varCoin >= 20 && !m_bIsBuyTwo;
m_coinButton.enabled = value && varCoin >= 10 && !m_bIsBuyThree;
}
//点击加强
public void OnClickStrength()
......@@ -31,8 +73,11 @@ public class PropSelectUI : MonoBehaviour
BattleCtrl.instance.battleUI.SetBombStrength();
BattleCtrl.instance.battleUI.SetCoin(-10);
SetOpenState();
m_strengthObj.SetActive(false);
//m_strengthObj.SetActive(false);
m_strengthMaskObj.SetActive(true);
m_strengthButton.enabled = false;
m_strengthSymbolObj.SetActive(true);
m_bIsBuyOne = true;
}
//点击double
public void OnClickDouble()
......@@ -40,8 +85,11 @@ public class PropSelectUI : MonoBehaviour
BattleCtrl.instance.battleUI.SetBombDouble();
BattleCtrl.instance.battleUI.SetCoin(-20);
SetOpenState();
m_doubleObj.SetActive(false);
//m_doubleObj.SetActive(false);
m_doubleMaskObj.SetActive(true);
m_doubleButton.enabled = false;
m_doubleSymbolObj.SetActive(true);
m_bIsBuyTwo = true;
}
//点击金币
public void OnClickCoin()
......@@ -49,8 +97,11 @@ public class PropSelectUI : MonoBehaviour
BattleCtrl.instance.battleUI.SetCoinDouble();
BattleCtrl.instance.battleUI.SetCoin(-10);
SetOpenState();
m_coinObj.SetActive(false);
//m_coinObj.SetActive(false);
m_coinMaskObj.SetActive(true);
m_coinButton.enabled = false;
m_coinSymbolObj.SetActive(true);
m_bIsBuyThree = true;
}
//开始
public void OnClickStart()
......@@ -66,17 +117,23 @@ public class PropSelectUI : MonoBehaviour
void SetOpenState()
{
int varCoin = LocalRecord.GetIntRecord(GlobalConfig.CoinReCordKey);
if(m_strengthObj.activeSelf)
{
m_strengthObj.SetActive(varCoin >= 10);
}
if(m_doubleObj.activeSelf)
{
m_doubleObj.SetActive(varCoin >= 20);
}
if(m_coinObj.activeSelf)
{
m_coinObj.SetActive(varCoin >= 10);
}
//if(m_strengthObj.activeSelf)
//{
// m_strengthObj.SetActive(varCoin >= 10);
//}
//if(m_doubleObj.activeSelf)
//{
// m_doubleObj.SetActive(varCoin >= 20);
//}
//if(m_coinObj.activeSelf)
//{
// m_coinObj.SetActive(varCoin >= 10);
//}
m_strengthMaskObj.SetActive(varCoin < 10 || m_bIsBuyOne);
m_doubleMaskObj.SetActive(varCoin < 20 || m_bIsBuyTwo);
m_coinMaskObj.SetActive(varCoin < 10 || m_bIsBuyThree);
m_strengthButton.enabled = varCoin >= 10 && !m_bIsBuyOne;
m_doubleButton.enabled = varCoin >= 20 && !m_bIsBuyTwo;
m_coinButton.enabled = varCoin >= 10 && !m_bIsBuyThree;
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BombState1View : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}
fileFormatVersion: 2
guid: 15a8391ec7ac4464aa379a73cf9f4f6c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
......@@ -190,8 +190,8 @@ public class BombView : MonoBehaviour
}
private void Update()
{
if (!BattleCtrl.instance.isStartBattle || BattleCtrl.instance.isEndBattle
/*|| BattleCtrl.instance.SelectPropState*/)
if (!BattleCtrl.instance.isStartBattle || BattleCtrl.instance.isEndBattle
|| BattleCtrl.instance.battleUI.IsActivitySelectLevelUi)
{
return;
}
......
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