Example #1
0
    public async void WhenAHeroIsPoisonedTheirHealthChangesOverTime()
    {
        Hero _Hero = new Hero();

        Godot.Collections.Array Properties = new Godot.Collections.Array();
        Properties.Add("Health");
        Poison poison = new Poison(_Hero);

        WAT.Recorder recorder = Record(_Hero, Properties);
        AddChild(_Hero);
        recorder.Start();
        await ToSignal(UntilTimeout(1.0F), YIELD);

        recorder.Stop();
        Array <int> Health = new Array <int>(recorder.GetPropertyTimeline("Health"));

        Assert.IsLessThan(Health[Health.Count - 1], Health[0]);

        RemoveChild(_Hero);
        _Hero.Free();
    }