コード例 #1
0
        internal SpellHistory(Unit unit, IUnitState unitState)
        {
            caster      = unit;
            casterState = unitState;

            if (!caster.IsOwner)
            {
                caster.AddCallback(nameof(IUnitState.GlobalCooldown), OnGlobalCooldownChanged);
            }
        }
コード例 #2
0
            void IUnitBehaviour.HandleUnitAttach(Unit unit)
            {
                this.unit = unit;

                currentMovementIndex = 0;

                StartMovement(idleMovement, MovementSlot.Idle);

                if (!unit.IsOwner)
                {
                    unit.AddCallback(nameof(IUnitState.MovementFlags), OnUnitStateFlagsChanged);
                }
            }