Skip to content

Commit

Permalink
Empty sequence blok on click geen error meer
Browse files Browse the repository at this point in the history
  • Loading branch information
YoupKuiper committed Apr 19, 2018
1 parent 45b00eb commit 39dade3
Show file tree
Hide file tree
Showing 7 changed files with 471 additions and 15 deletions.
6 changes: 5 additions & 1 deletion Assets/Data/Goal/LocationGoalPlayer.asset
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c6630866c4a843946a789218cf72f679, type: 3}
m_Name: LocationGoalPlayer
m_EditorClassIdentifier:
TargetGridPosition: []
TargetGridPosition:
- PlayerNumber: 0
Location: {x: 2, y: 4}
- PlayerNumber: 1
Location: {x: 2, y: 2}
4 changes: 2 additions & 2 deletions Assets/Prefabs/PhotonManager.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ MonoBehaviour:
ObservedComponents:
- {fileID: 0}
ObservedComponentsFoldoutOpen: 1
viewIdField: 1
instantiationId: 1
viewIdField: 0
instantiationId: -1
currentMasterID: -1
isRuntimeInstantiated: 0
--- !u!114 &114512755704445868
Expand Down
3 changes: 2 additions & 1 deletion Assets/Prefabs/UI/SequenceBar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public void GetCount()

public void HasChanged(int commandSlotIndex, bool destroy)
{
if (destroy)
if (destroy && CommandSlots[commandSlotIndex].transform.childCount > 0)
{
//Destroy the child of the slot
var command = CommandSlots[commandSlotIndex].transform.GetChild(0).gameObject;
Expand All @@ -137,6 +137,7 @@ public void HasChanged(int commandSlotIndex, bool destroy)

//Remove the command at that index from the player
Player.RemoveCommand(commandSlotIndex);

}
}

Expand Down
Loading

0 comments on commit 39dade3

Please sign in to comment.