Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        selectedGameObject.SubscribeToText(SelectedObjectText, go => go == null ? "No Object Selected" : go.name);
        selectedGameObject.SetValueAndForceNotify(null);


        TapStream().Subscribe(p =>
        {
            RaycastHit hit;
            GameObject go = null;
            if (Physics.Raycast(Camera.main.ScreenPointToRay(p), out hit))
            {
                go = hit.collider.gameObject;
            }

            selectedGameObject.Value = go;
        });
    }
Beispiel #2
0
 public void RaiseDamageEvent(DamageEvent damageEvent)
 {
     DamageStream.SetValueAndForceNotify(damageEvent);
 }