void Start() { Transform control = GameObject.Find("PlayerRobot").transform; MultiContolBase playerRobot = new MultiContolBase(player.transform, control.Find("Pos")); player.SetTargetControl(control, playerRobot); playerRobot.Init(); playerRobot.SetCameraHands(player.HUDCamera, player.rightHand, player.leftHand); multiControlsDic.Add(control.name, playerRobot); control = GameObject.Find("SpiralElevator").transform; SpiralElevatorControl spiralElevatorControl = new SpiralElevatorControl(control, control.Find("Pos")); spiralElevatorControl.Init(); spiralElevatorControl.SetCameraHands(player.HUDCamera, player.leftHand, player.rightHand); multiControlsDic.Add(control.name, spiralElevatorControl); control = GameObject.Find("RoboArm").transform; RoboArmControl roboArmControl = new RoboArmControl(control, control.Find("Pos")); roboArmControl.Init(); roboArmControl.SetCameraHands(player.HUDCamera, player.leftHand, player.rightHand); roboArmControl.GiveInputAction(player.SqueezeAction); multiControlsDic.Add(control.name, roboArmControl); control = GameObject.Find("Drone").transform; DroneControl droneControl = new DroneControl(control, control.Find("Pos")); droneControl.Init(); droneControl.SetCameraHands(player.HUDCamera, player.leftHand, player.rightHand); droneControl.GiveInputAction(player.SqueezeAction); multiControlsDic.Add(control.name, droneControl); }
private void InitializeDroneControl() { DroneConfig droneConfig = new DroneConfig(); droneConfig.DefaultCameraMode = DroneCameraMode.BottomCamera; droneControl = new DroneControl(); droneControl.Init(droneConfig); droneControl.Error += droneControl_Error_Async; droneControl.ConnectionStateChanged += droneControl_ConnectionStateChanged_Async; }
private void InitializeDroneControl(DroneConfig droneConfig) { droneControl = new DroneControl(); droneControl.Init(droneConfig); }