Ejemplo n.º 1
0
 void Start()
 {
     rend = GetComponent <Renderer> ();
     hc   = GetComponent <HologramComponent> ();
     rb   = GetComponent <Rigidbody>();
     if (colors == null || colors.Length == 0)
     {
         colors = new[] { Color.blue, Color.red };
     }
     SetColor(colors[0]);
 }
Ejemplo n.º 2
0
    void OnTriggerExit(Collider collider)
    {
        HologramComponent hc = collider.GetComponentInParent <HologramComponent>();

        if (hc == null)
        {
            return;
        }
        OnTrackingAreaExitEvent e = new OnTrackingAreaExitEvent(collider.gameObject, this);

        Send(e);
    }
Ejemplo n.º 3
0
    void CmdInteract(GameObject go, string method)
    {
        HologramComponent hc = go.GetComponent <HologramComponent> ();

        if (hc != null)
        {
            hc.Invoke(method);
        }
        else
        {
            Debug.LogWarning("Can't find HologramComponent for " + go.name
                             + " using SendMessage insetead");
            go.SendMessage(method);
        }
    }
Ejemplo n.º 4
0
    public static void OnGameObjectInteraction(GameObject go, string method, object[] args)
    {
        HologramComponent hc = go.GetComponent <HologramComponent> ();

        if (hc != null)
        {
            hc.Invoke(method, args);
        }
        else
        {
            if (args != null && args.Length > 0)
            {
                go.SendMessage(method, args [0]);
            }
            else
            {
                Debug.LogWarning("Can't find HologramComponent for " + go.name
                                 + " using SendMessage insetead");
                go.SendMessage(method);
            }
        }
    }
Ejemplo n.º 5
0
 void Start()
 {
     hc  = GetComponent <HologramComponent>();
     ecc = GetComponent <EventContextCollector>();
 }
Ejemplo n.º 6
0
//	GUILayoutOption[] guiOptions = {};

    void OnEnable()
    {
        hc = (HologramComponent)target;
        go = hc.gameObject;
    }