Пример #1
0
        internal void Detached()
        {
            if (!caster.IsOwner)
            {
                caster.RemoveCallback(nameof(IUnitState.GlobalCooldown), OnGlobalCooldownChanged);
            }

            spellCooldowns.Clear();
            spellCooldownsById.Clear();
        }
            void IUnitBehaviour.HandleUnitDetach()
            {
                if (!unit.IsOwner)
                {
                    unit.RemoveCallback(nameof(IUnitState.MovementFlags), OnUnitStateFlagsChanged);
                }

                ResetAllMovement();

                DetachMoveState(true);

                currentMovementIndex = 0;

                unit = null;
            }