コード例 #1
0
ファイル: ArcMaker.cs プロジェクト: CryptArc/leapMotion8Ball
 public void setContent(string text)
 {
     if (_textLabel == null)
     {
         findChildren();
     }
     _arcType = MenuBehavior.MenuType.TEXT;
     (_textLabel.GetComponent(typeof(TextMesh)) as TextMesh).text = text;
     _textLabel.renderer.enabled = true;
 }
コード例 #2
0
ファイル: ArcMaker.cs プロジェクト: CryptArc/leapMotion8Ball
 public void setContent(Sprite activeSprite, Sprite inactiveSprite = null, float scalingFactor = 1.0f)
 {
     _spriteScalingFactor = scalingFactor;
     if (_activeSprite == null || _inactiveSprite == null)
     {
         findChildren();
     }
     _arcType = MenuBehavior.MenuType.ICON;
     (_activeSprite.GetComponent(typeof(SpriteRenderer)) as SpriteRenderer).sprite = activeSprite;
     if (inactiveSprite != null)
     {
         _inactiveSpriteAvailible = true;
         (_inactiveSprite.GetComponent(typeof(SpriteRenderer)) as SpriteRenderer).sprite = inactiveSprite;
         _inactiveSprite.renderer.enabled = true;
     }
     else
     {
         _activeSprite.renderer.enabled = true;
     }
 }
コード例 #3
0
 public void setContent(string text)
 {
     if(_textLabel == null) { findChildren(); }
     _arcType = MenuBehavior.MenuType.TEXT;
     (_textLabel.GetComponent(typeof(TextMesh)) as TextMesh).text = text;
     _textLabel.GetComponent<Renderer>().enabled = true;
 }
コード例 #4
0
 public void setContent(Sprite activeSprite, Sprite inactiveSprite = null, float scalingFactor = 1.0f)
 {
     _spriteScalingFactor = scalingFactor;
     if(_activeSprite == null || _inactiveSprite == null) { findChildren(); }
     _arcType = MenuBehavior.MenuType.ICON;
     (_activeSprite.GetComponent(typeof(SpriteRenderer)) as SpriteRenderer).sprite = activeSprite;
     if(inactiveSprite != null)
     {
         _inactiveSpriteAvailible = true;
         (_inactiveSprite.GetComponent(typeof(SpriteRenderer)) as SpriteRenderer).sprite = inactiveSprite;
         _inactiveSprite.GetComponent<Renderer>().enabled = true;
     }
     else
     {
         _activeSprite.GetComponent<Renderer>().enabled = true;
     }
 }