Skip to content

Commit

Permalink
resource exists
Browse files Browse the repository at this point in the history
  • Loading branch information
andreakarasho committed Mar 29, 2024
1 parent d06da8b commit e34b64d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/System.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ internal Scheduler AddSystemParam<T>(T param) where T : ISystemParam

return this;
}

internal bool ResourceExists<T>() => _resources.ContainsKey(typeof(T));
}

public interface IPlugin
Expand Down Expand Up @@ -232,9 +234,10 @@ void ISystemParam.New(object arguments)
}

public void AddResource<T>(T resource)
{
_scheduler?.AddResource(resource);
}
=> _scheduler?.AddResource(resource);

public bool ResourceExists<T>()
=> _scheduler.ResourceExists<T>();
}

public sealed class Res<T> : ISystemParam
Expand Down

0 comments on commit e34b64d

Please sign in to comment.