How to get ProgressCount
-
Hey, i'm trying to get progress count number in part of openbullet. There is already definition about that. We can reach it by
var runner = sender as RunnerViewModel; runner.ProgressCount
dynamically.
But i'm using that integer in part of some kind of timer so i can't always call the "var runner = .."
How can i do it static definition?
I mean
I'm trying to define runner in top of my codes and just reach it in my code by simply writeIRunnerMessaging senderx; RuriLib.Runner.RunnerViewModel runnerz = senderx as RunnerViewModel; ..... in my function currentprog = Runnerstatic.ProgressCount;
As you see here my problem actually isn't about ob, it's kind of problem basics for c# but i'm not programmer so i wish you can forgive me about that.
Regards.
-
Can't you just pass the instance of the runner to your function?
-
Yea actually I've simply tried to define it by
public static RunnerViewModel Runnerx { get; set; }
but it returns me Runnerx as always null
@Ruri
-
- I don't remember much anymore about OB1 code, I rewrote it from scratch for OB2
- I would have to see you whole code to understand what you're doing wrong