Created
September 27, 2016 17:41
-
-
Save Polyrhythm/e1bc8b6ac7f1a95a3e33ae8a7f0b34ca to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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