Commit 4482e904 authored by 赤子奈落's avatar 赤子奈落

new selecting arrow

parent bceb72c4
......@@ -33,6 +33,8 @@ public class CardOnSelection : MonoBehaviour
public gameCard card;
public int sortID;
bool sort;
public GameObject arrow;
public CardOnSelection(gameCard card, bool theFirst, bool theLast, bool sort)
{
this.card = card;
......@@ -140,6 +142,8 @@ public class CardOnSelection : MonoBehaviour
pic.color = Color.white;
else
pic.color = new Color(0.5f, 0.5f, 0.5f, 1f);
if (selected == false)
Destroy(arrow);
}
void OnClick()
......@@ -157,6 +161,12 @@ public class CardOnSelection : MonoBehaviour
dark = false;
pic.color = Color.white;
if((card.p.location & (uint)CardLocation.Onfield) > 0 && arrow == null)
{
arrow = ABLoader.LoadAB("effects/other/fxp_arrow_aim_001");
arrow.transform.position = card.gameObject.transform.position;
}
}
else
{
......@@ -165,6 +175,9 @@ public class CardOnSelection : MonoBehaviour
dark = false;
pic.color = Color.white;
if(arrow != null)
Destroy(arrow);
}
cardSelectionHandler.Refresh(this);
}
......
......@@ -212,6 +212,8 @@ public class CardSelectionHandler : MonoBehaviour
{
Program.I().ocgcore.RMSshow_input("AnnounceCard", InterString.Get("请输入关键字:"), "");
}
foreach (var card in cardsOnSelection)
Destroy(card.arrow);
}
public void HideWithoutAction()
......@@ -219,6 +221,8 @@ public class CardSelectionHandler : MonoBehaviour
core.Sleep(12);
isShowed = false;
gameObject.transform.DOLocalMoveY(-830, 0.2f);
foreach (var card in cardsOnSelection)
Destroy(card.arrow);
}
void TempHide()
......@@ -345,6 +349,11 @@ public class CardSelectionHandler : MonoBehaviour
}
if(core.currentMessage != GameMessage.SelectSum)
HideWithoutAction();
else
{
foreach (var card in cardsOnSelection)
Destroy(card.arrow);
}
}
public void Refresh(CardOnSelection card)
......
......@@ -1390,7 +1390,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!114 &1851020169
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -1507,7 +1507,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!81 &1897184763
AudioListener:
m_ObjectHideFlags: 0
......
......@@ -11,7 +11,7 @@ public class TestLoad : MonoBehaviour
{
void Start()
{
var a1 = ABLoader.LoadABFolder("spine/26988374");
var a1 = ABLoader.LoadAB("effects/other/fxp_arrow_aim_001");
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -30,7 +30,7 @@ public class Menu : WindowServantSP
UIHelper.registEvent(gameObject, "exit_", onClickExit);
UIHelper.registEvent(gameObject, "animation_", onClickAnimation);
//MDPRO2 update
UIHelper.getByName<UILabel>(gameObject, "version_").text = "2.0.2";
UIHelper.getByName<UILabel>(gameObject, "version_").text = "2.0.3";
Program.I().StartCoroutine(checkUpdate());
}
......
......@@ -3112,8 +3112,8 @@ public class Ocgcore : ServantWithCardDescription
// new messageSystemValue {value = "0", hint = "no"});
List<gameCard> oneCardToSend = new List<gameCard>() { card };
Program.I().cardSelection.show(oneCardToSend, true, 1, 1, hin);
if((card.p.location & (uint)CardLocation.Onfield) >0)
card.add_one_decoration(Program.I().mod_ocgcore_decoration_chain_selecting, 4, Vector3.zero, "chain_selecting");
//if((card.p.location & (uint)CardLocation.Onfield) >0)
// card.add_one_decoration(Program.I().mod_ocgcore_decoration_chain_selecting, 4, Vector3.zero, "chain_selecting");
card.currentFlash = gameCard.flashType.Active;
}
break;
......@@ -3478,8 +3478,8 @@ public class Ocgcore : ServantWithCardDescription
//处理多张
for (var i = 0; i < chainCards.Count; i++)
{
if ((chainCards[i].p.location & (uint)CardLocation.Hand) > 0 || (chainCards[i].p.location & (uint)CardLocation.Onfield) > 0)
chainCards[i].add_one_decoration(Program.I().mod_ocgcore_decoration_chain_selecting, 4, Vector3.zero, "chain_selecting");
//if ((chainCards[i].p.location & (uint)CardLocation.Hand) > 0 || (chainCards[i].p.location & (uint)CardLocation.Onfield) > 0)
// chainCards[i].add_one_decoration(Program.I().mod_ocgcore_decoration_chain_selecting, 4, Vector3.zero, "chain_selecting");
chainCards[i].forSelect = true;
chainCards[i].currentFlash = gameCard.flashType.Active;
}
......@@ -3502,8 +3502,8 @@ public class Ocgcore : ServantWithCardDescription
cardsWaitToSend.Clear();
for (var i = 0; i < chainCards.Count; i++)
{
if ((chainCards[i].p.location & (uint)CardLocation.Onfield) > 0)
chainCards[i].add_one_decoration(Program.I().mod_ocgcore_decoration_chain_selecting, 4, Vector3.zero, "chain_selecting");
//if ((chainCards[i].p.location & (uint)CardLocation.Onfield) > 0)
// chainCards[i].add_one_decoration(Program.I().mod_ocgcore_decoration_chain_selecting, 4, Vector3.zero, "chain_selecting");
chainCards[i].forSelect = true;
chainCards[i].currentFlash = gameCard.flashType.Active;
cardsWaitToSend.Add(chainCards[i]);
......@@ -3519,8 +3519,8 @@ public class Ocgcore : ServantWithCardDescription
{
for (var i = 0; i < chainCards.Count; i++)
{
if ((chainCards[i].p.location & (uint)CardLocation.Onfield) > 0)
chainCards[i].add_one_decoration(Program.I().mod_ocgcore_decoration_chain_selecting, 4, Vector3.zero, "chain_selecting");
//if ((chainCards[i].p.location & (uint)CardLocation.Onfield) > 0)
// chainCards[i].add_one_decoration(Program.I().mod_ocgcore_decoration_chain_selecting, 4, Vector3.zero, "chain_selecting");
chainCards[i].forSelect = true;
chainCards[i].currentFlash = gameCard.flashType.Active;
}
......@@ -3598,8 +3598,7 @@ public class Ocgcore : ServantWithCardDescription
cardsInSort.Remove(card);
cardsInSort.Add(card);
ES_sortSum++;
card.add_one_decoration(Program.I().mod_ocgcore_decoration_card_selecting, 4, Vector3.zero,
"card_selecting");
//card.add_one_decoration(Program.I().mod_ocgcore_decoration_card_selecting, 4, Vector3.zero, "card_selecting");
card.currentFlash = gameCard.flashType.Select;
}
}
......@@ -3641,6 +3640,8 @@ public class Ocgcore : ServantWithCardDescription
else
ES_min = r.ReadUInt16();
count = r.ReadByte();
GameObject decoration = ABLoader.LoadAB("effects/other/fxp_arrow_aim_001");
for (var i = 0; i < count; i++)
{
code = r.ReadInt32();
......@@ -3660,11 +3661,13 @@ public class Ocgcore : ServantWithCardDescription
allCardsInSelectMessage.Add(card);
card.selectPtr = i;
card.forSelect = true;
card.add_one_decoration(Program.I().mod_ocgcore_decoration_card_selecting, 4, Vector3.zero, "card_selecting");
//card.add_one_decoration(Program.I().mod_ocgcore_decoration_card_selecting, 4, Vector3.zero, "card_selecting");
card.add_one_decoration(decoration, 4, Vector3.zero, "card_selecting");
card.isShowed = true;
card.currentFlash = gameCard.flashType.Select;
}
}
Object.Destroy(decoration);
if (gameInfo.queryHashedButton("clearCounter") == false)
{
......@@ -5848,13 +5851,19 @@ public class Ocgcore : ServantWithCardDescription
if (!allOnFieldOrHandButNotOverlay)
Program.I().cardSelection.show(cardsSelectable, false, ES_min, ES_max, hint);
GameObject decoration = ABLoader.LoadAB("effects/other/fxp_arrow_aim_001");
for (var i = 0; i < cardsSelectable.Count; i++)
{
//cardsSelectable[i].isShowed = true;
if (allOnFieldOrHandButNotOverlay)
cardsSelectable[i].add_one_decoration(Program.I().mod_ocgcore_decoration_card_selecting, 4, Vector3.zero, "card_selecting");
{
//cardsSelectable[i].add_one_decoration(Program.I().mod_ocgcore_decoration_card_selecting, 4, Vector3.zero, "card_selecting");
cardsSelectable[i].add_one_decoration(decoration, 4, Vector3.zero, "card_selecting");
}
cardsSelectable[i].currentFlash = gameCard.flashType.Select;
}
Object.Destroy(decoration);
for (var x = 0; x < cardsMustBeSelected.Count; x++)
{
......@@ -8719,13 +8728,11 @@ public class Ocgcore : ServantWithCardDescription
}
else if (gameObject.name == "pic_button")
{
Debug.Log("Mark1");
gameField.hideSpButtons(gameObject);
gameField.btn_decide.hide();
}
else if (gameObject.name == "back_cardDetail")
{
Debug.Log("Mark2");
gameField.hideSpButtons(gameObject);
gameField.btn_decide.hide();
}
......
......@@ -215,18 +215,19 @@ public class Program : MonoBehaviour
private void loadResource(GameObject g)
{
try
{
var obj = Instantiate(g);
obj.SetActive(false);
allObjects.Add(obj);
}
catch (Exception e)
{
Debug.Log(e);
}
//try
//{
// var obj = Instantiate(g);
// obj.SetActive(false);
// allObjects.Add(obj);
//}
//catch (Exception e)
//{
// Debug.Log(e);
//}
}
private void loadResources()
{
loadResource(mod_audio_effect);
......
......@@ -64,7 +64,7 @@ MonoBehaviour:
mPivot: 4
mWidth: 400
mHeight: 50
mDepth: 23
mDepth: 523
autoResizeBoxCollider: 0
hideIfOffScreen: 0
keepAspectRatio: 0
......@@ -162,7 +162,7 @@ MonoBehaviour:
mPivot: 4
mWidth: 800
mHeight: 500
mDepth: -100
mDepth: 499
autoResizeBoxCollider: 0
hideIfOffScreen: 0
keepAspectRatio: 0
......@@ -339,7 +339,7 @@ MonoBehaviour:
mPivot: 4
mWidth: 400
mHeight: 50
mDepth: 2
mDepth: 502
autoResizeBoxCollider: 1
hideIfOffScreen: 0
keepAspectRatio: 0
......@@ -474,7 +474,7 @@ MonoBehaviour:
mPivot: 4
mWidth: 800
mHeight: 500
mDepth: 0
mDepth: 500
autoResizeBoxCollider: 1
hideIfOffScreen: 0
keepAspectRatio: 0
......@@ -699,7 +699,7 @@ MonoBehaviour:
mPivot: 4
mWidth: 400
mHeight: 50
mDepth: 2
mDepth: 502
autoResizeBoxCollider: 1
hideIfOffScreen: 0
keepAspectRatio: 0
......@@ -797,7 +797,7 @@ MonoBehaviour:
mPivot: 4
mWidth: 800
mHeight: 100
mDepth: 1
mDepth: 501
autoResizeBoxCollider: 0
hideIfOffScreen: 0
keepAspectRatio: 0
......@@ -895,7 +895,7 @@ MonoBehaviour:
mPivot: 7
mWidth: 800
mHeight: 200
mDepth: 1
mDepth: 501
autoResizeBoxCollider: 0
hideIfOffScreen: 0
keepAspectRatio: 0
......@@ -1041,7 +1041,7 @@ MonoBehaviour:
mPivot: 4
mWidth: 400
mHeight: 50
mDepth: 20
mDepth: 520
autoResizeBoxCollider: 1
hideIfOffScreen: 0
keepAspectRatio: 0
......@@ -1127,7 +1127,7 @@ MonoBehaviour:
mPivot: 4
mWidth: 800
mHeight: 500
mDepth: 1
mDepth: 501
autoResizeBoxCollider: 0
hideIfOffScreen: 0
keepAspectRatio: 0
......@@ -1213,7 +1213,7 @@ MonoBehaviour:
mPivot: 4
mWidth: 860
mHeight: 560
mDepth: 2
mDepth: 502
autoResizeBoxCollider: 0
hideIfOffScreen: 0
keepAspectRatio: 0
......@@ -1299,7 +1299,7 @@ MonoBehaviour:
mPivot: 4
mWidth: 400
mHeight: 50
mDepth: 15
mDepth: 515
autoResizeBoxCollider: 0
hideIfOffScreen: 0
keepAspectRatio: 0
......
......@@ -115,7 +115,7 @@ MonoBehaviour:
mPivot: 4
mWidth: 800
mHeight: 350
mDepth: -100
mDepth: 499
autoResizeBoxCollider: 0
hideIfOffScreen: 0
keepAspectRatio: 0
......@@ -244,7 +244,7 @@ MonoBehaviour:
mPivot: 4
mWidth: 800
mHeight: 350
mDepth: 0
mDepth: 500
autoResizeBoxCollider: 1
hideIfOffScreen: 0
keepAspectRatio: 0
......@@ -330,7 +330,7 @@ MonoBehaviour:
mPivot: 4
mWidth: 860
mHeight: 410
mDepth: 2
mDepth: 502
autoResizeBoxCollider: 0
hideIfOffScreen: 0
keepAspectRatio: 0
......@@ -416,7 +416,7 @@ MonoBehaviour:
mPivot: 7
mWidth: 800
mHeight: 200
mDepth: 1
mDepth: 501
autoResizeBoxCollider: 0
hideIfOffScreen: 0
keepAspectRatio: 0
......@@ -514,7 +514,7 @@ MonoBehaviour:
mPivot: 4
mWidth: 800
mHeight: 100
mDepth: 1
mDepth: 501
autoResizeBoxCollider: 0
hideIfOffScreen: 0
keepAspectRatio: 0
......@@ -612,7 +612,7 @@ MonoBehaviour:
mPivot: 4
mWidth: 800
mHeight: 350
mDepth: 1
mDepth: 501
autoResizeBoxCollider: 0
hideIfOffScreen: 0
keepAspectRatio: 0
......
......@@ -471,6 +471,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
audioClip: {fileID: 8300000, guid: ae3d99ac8f0551f47a359c3411a82339, type: 3}
trigger: 0
type: 0
volume: 1
pitch: 1
--- !u!1 &3814992364745892074
......
......@@ -325,7 +325,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!4 &409472
Transform:
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