Exemplo n.º 1
0
 private void TappedEvent(TappedEventArgs obj)
 {
     placeable.OnSelected();
     if (!placeable.IsPlacing)
     {
         twoHandManipulatable.enabled = true;
         inputStateMachine.setState(Free3DState.Name);
     }
 }
    private void OnLoad(GameObject go, object obj)
    {
        int PlacementSurfacesDic = (int)obj;

        go = GameObject.Instantiate <GameObject>(go);
        //go.transform.localScale = Vector3.one ;
        inputStateMachine.targetTransform = go.transform;
        Placeable placeable = go.AddComponent <Placeable>();

        go.AddComponent <TwoHandManipulatable>();
        if (PlacementSurfacesDic == 0)
        {
            placeable.PlacementSurface = PlacementSurfaces.Horizontal;
        }
        else
        {
            placeable.PlacementSurface = PlacementSurfaces.Vertical;
        }
        placeable.OnSelected();
        inputStateMachine.setState(GazeMoveState.Name);
        go.transform.parent    = globalconfig.worldAnchor;
        this.currentLoadObject = go.transform;
    }