Skip to content

Commit

Permalink
TestClass changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Readie1593 committed Jan 28, 2021
1 parent e093cdb commit adea5a7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public void Init(IPALogger _logger, Zenjector zenjector)
Logger.Debug("Logger initialized.");

#if DEBUG
zenjector.OnApp<TestInstaller>();
//zenjector.OnGame<TestInstaller>().Expose<ScoreController>();
#endif
webSocketServer = new Server.Server();
Expand Down
16 changes: 11 additions & 5 deletions src/TestClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,22 @@ class TestClass : IInitializable, IDisposable
ScoreController scoreController;
//ReplayPlayer rpv;

public TestClass([InjectOptional] ScoreController _scoreController)
/*public TestClass([InjectOptional] ScoreController _scoreController)
{
//relativeScoreAndImmediateRankCounter = _relativeScoreAndImmediateRankCounter;
//scoreUIController = _scoreUIController;
if (!(_scoreController is ScoreController)) { Plugin.Logger.Error("ScoreController not found"); }
else { scoreController = _scoreController; }
}*/

public TestClass()
{

}

public void Initialize()
{

Plugin.Logger.Info("Initialize TestClass.cs");
}

string ScoreName;
Expand Down Expand Up @@ -108,17 +113,18 @@ private void RelativeScoreAndImmediateRankCounter_relativeScoreOrImmediateRankDi
Plugin.Logger.Info("====");
Plugin.Logger.Info(rpv.GetField<int, ReplayPlayer>(ScoreName).ToString());
}*/
}
TextMeshProUGUI textMeshProUGUI = scoreUIController.GetField<TextMeshProUGUI, ScoreUIController>("_scoreText");
Plugin.Logger.Info(int.Parse(textMeshProUGUI.text.Replace(" ", "")).ToString());
Plugin.Logger.Info((relativeScoreAndImmediateRankCounter.relativeScore * 100).ToString());
Plugin.Logger.Info(relativeScoreAndImmediateRankCounter.immediateRank.ToString());
Plugin.Logger.Info(relativeScoreAndImmediateRankCounter.immediateRank.ToString());*/
}

public void Dispose()
{
relativeScoreAndImmediateRankCounter.relativeScoreOrImmediateRankDidChangeEvent -= RelativeScoreAndImmediateRankCounter_relativeScoreOrImmediateRankDidChangeEvent;
Plugin.Logger.Info("Dispose TestClass.cs");
//relativeScoreAndImmediateRankCounter.relativeScoreOrImmediateRankDidChangeEvent -= RelativeScoreAndImmediateRankCounter_relativeScoreOrImmediateRankDidChangeEvent;
}
}
}
Expand Down

0 comments on commit adea5a7

Please sign in to comment.