示例#1
0
    public void StopPivot(PivotController joint)
    {
        joint.active = false;

        //joint.transform.eulerAngles = AngleLerp(joint.transform.rotation.eulerAngles, init_v3, Time.deltaTime);

        //joint.transform.eulerAngles = init_v3;
    }
示例#2
0
    public void StartPivot(PivotController joint)
    {
        //init_x = joint.transform.eulerAngles.x;
        //init_y = joint.transform.eulerAngles.y;
        //init_z = joint.transform.eulerAngles.z;
        //init_v3.x = init_x;
        //init_v3.y = init_y;
        //init_v3.z = init_z;

        joint.active = true;
    }
示例#3
0
    void Start()
    {
        GameObject playerGO = GameObject.FindWithTag("Player");//allows access to Player GO group

        if (playerGO != null)
        {
            pivotController = playerGO.GetComponent <PivotController>();
        }
        else
        {
            Debug.Log("Cannot find 'PivotController' script");
        }
    }
示例#4
0
    void Start()
    {
        instance = this;                                        //Makes this class' public functions more easily globally accessible (see MasterNotes V0.02)
        GameObject playerGO = GameObject.FindWithTag("Player"); //allows access to Player GO group

        if (playerGO.GetComponent <PivotController>() != null)
        {
            pivotController = playerGO.GetComponent <PivotController>();
        }
        else
        {
            Debug.Log("Cannot find 'PivotController' script");
        }
    }
 public void OnPivotNavigatedTo(PivotNavigationContext context)
 {
     _pivotController = context.PivotController;
 }
示例#6
0
 void ResetPivot(GameObject newPivot)
 {
     pivotController         = newPivot.GetComponent <PivotController>();
     transform.localRotation = Quaternion.identity;
     hasValidPivot           = true;
 }
示例#7
0
 public void TogglePivot(PivotController joint)
 {
     joint.active = !joint.active;
 }
示例#8
0
 private void Start()
 {
     pivotCont = GameObject.Find("PivotObj").transform.GetComponent <PivotController>();
 }
 public PivotContainerViewModel()
 {
     NavigationMenuElements = new ObservableCollection <MenuElement>();
     ShortCuts        = new List <KeyBinding>();
     _pivotController = new PivotController();
 }