Skip to content

Instantly share code, notes, and snippets.

@Polyrhythm
Created September 27, 2016 17:41
Show Gist options
  • Save Polyrhythm/e1bc8b6ac7f1a95a3e33ae8a7f0b34ca to your computer and use it in GitHub Desktop.
Save Polyrhythm/e1bc8b6ac7f1a95a3e33ae8a7f0b34ca to your computer and use it in GitHub Desktop.
namespace Client.UI
{
public class LogPanelComponent : ScopeComponent
{
[Serializable]
public class Log
{
// Position of log.
public Transform transform;
}
public Log log;
private AsyncScope _scope;
protected override IAsyncScope ResolveInternal(IAsyncScope super)
{
var scope = new AsyncScope(super);
_scope = scope;
enabled = true;
gameObject.SetActive(true);
return scope;
}
void OnDrawGizmos()
{
Gizmos.DrawSphere(log.transform.position, 0.02f);
}
private IAsyncScope Show(Log log)
{
if (log.transform == null)
{
return new AsyncScope().Resolve();
}
return new AsyncScope().Resolve();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment