1. 跑通第一章全部流程 2. 优化拼装玩法体验
This commit is contained in:
@@ -318,6 +318,7 @@ namespace CustomComponent
|
||||
{
|
||||
slot.SetOccupiedPart(part);
|
||||
part.PlaceToSlot(slot);
|
||||
HidePlacedPair(slot, part);
|
||||
|
||||
_placedCount++;
|
||||
AdvanceOrderCursor();
|
||||
@@ -338,8 +339,6 @@ namespace CustomComponent
|
||||
}
|
||||
|
||||
_isCompleted = true;
|
||||
|
||||
GameEntry.Event.Fire(this, CombineCompletedEventArgs.Create());
|
||||
_onPuzzleCompleted.Invoke();
|
||||
}
|
||||
|
||||
@@ -371,6 +370,19 @@ namespace CustomComponent
|
||||
GameEntry.Event.Fire(this, CombineFeedbackEventArgs.Create(feedbackType, message));
|
||||
}
|
||||
|
||||
private static void HidePlacedPair(CombineSlot slot, CombineDraggablePart part)
|
||||
{
|
||||
if (slot != null && slot.gameObject != null)
|
||||
{
|
||||
slot.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
if (part != null && part.gameObject != null)
|
||||
{
|
||||
part.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Runtime Context
|
||||
@@ -569,6 +581,7 @@ namespace CustomComponent
|
||||
for (int i = 0; i < _orderedSlots.Count; i++)
|
||||
{
|
||||
CombineSlot slot = _orderedSlots[i];
|
||||
slot.gameObject.SetActive(true);
|
||||
slot.BindController(this);
|
||||
slot.ResetSlot();
|
||||
}
|
||||
@@ -587,6 +600,7 @@ namespace CustomComponent
|
||||
continue;
|
||||
}
|
||||
|
||||
part.gameObject.SetActive(true);
|
||||
part.BindController(this);
|
||||
part.CacheSpawnState();
|
||||
part.ResetToSpawn();
|
||||
|
||||
Reference in New Issue
Block a user