13 Blackboard References

This example shows you how to reference another blackboard from a blackboard.

These files can be found in the /Examples/[example] and /Blackboards/Examples folders.

SourceBlackboard.cs

using CrashKonijn.RabbitBlackboard.Contracts;

namespace CrashKonijn.BlackboardPro.Blackboards.Examples
{
    public partial class SourceBlackboard : BlackboardBehaviour
    {
        private int lowHealth = 50;
    }
}

ReferenceBlackboard.cs

using CrashKonijn.RabbitBlackboard.Contracts;

namespace CrashKonijn.BlackboardPro.Blackboards.Examples
{
    public partial class ReferenceBlackboard : BlackboardBehaviour
    {
        private SourceBlackboard _sourceBlackboard;

        private int health;

        private static bool isLowHealth(SourceBlackboard.Signals.LowHealth lowHealth, Signals.Health health) => health.Value < lowHealth.Value;
    }
}

DoubleReferenceBlackboard.cs

Last updated