Skip to content

Commit

Permalink
fixed wound tracker not updating values
Browse files Browse the repository at this point in the history
  • Loading branch information
GlowPuff committed Dec 13, 2022
1 parent feed08e commit 7307352
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 14 deletions.
5 changes: 3 additions & 2 deletions ImperialCommander2/Assets/Scripts/Saga/Common/HPTracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ public void ResetTracker()
wheelHandler.ResetWheeler();
}

public void SetValue( DeploymentCard c, int idx )
public void SetValue( DeploymentCard c, int idx, bool setActive )
{
gameObject.SetActive( true );
gameObject.SetActive( setActive );
card = c;
index = idx;
groupColorImage.color = DataStore.pipColors[c.colorIndex].ToColor();
Expand All @@ -28,6 +28,7 @@ public void SetValue( DeploymentCard c, int idx )

public void UpdateWoundValue()
{
Debug.Log( wheelHandler.wheelValue );
if ( card != null )
card.woundTrackerValue[index] = wheelHandler.wheelValue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ public void Reset( DeploymentCard card )
}

//show trackers for the # of enemies in the group
for ( int i = 0; i < card.size; i++ )
for ( int i = 0; i < trackers.Length; i++ )
{
trackers[i].SetValue( card, i );
trackers[i].SetValue( card, i, i < card.size );
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void Start()
//DEBUG BOOTSTRAP A MISSION
//comment this out for production build
#if DEBUG
//bootstrapDEBUG();
//bootstrapDEBUG( "CORE2" );
//restoreDEBUG();//comment this out for production build
#endif

Expand Down

Large diffs are not rendered by default.

0 comments on commit 7307352

Please sign in to comment.