コード例 #1
0
        /// <summary>Initializes a new instance of the <see cref="TestCommunicationSystem" /> class.</summary>
        public TestCommunicationSystem()
            : base(Aspect.All(typeof(TestHealthComponent)))
        {
            this.damage = 10;
            BlackBoard.AddTrigger(
                new SimpleTrigger(
                    "Damage",
                    (a, b) => true,
                    a =>
            {
                if (a == TriggerStateType.ValueChanged)
                {
                    this.damage = BlackBoard.GetEntry <int>("Damage");
                }
            }));

            this.damage = BlackBoard.GetEntry <int>("Damage");
        }