public void Init(Unit unit, Camera controlCamera, JoystickFeedbackGizmo feedbackGizmo, StraightWeaponGizmo straightWeaponGizmo)
 {
     _focusedUnit = unit;
     _feedbackGizmo = feedbackGizmo;
     _joystick = GetComponent<ScreenJoystick>();
     _joystick.Init(controlCamera);
     _joystick.GetWorldDragStartPointMethod = () => unit.Position;
     _joystick.OnPointerStayEvent = OnPointerStay;
     _joystick.OnPointerUpEvent = OnPointerUp;
     _feedbackGizmo.Init(_joystick, unit.transform);
     straightWeaponGizmo.Init(_joystick, _focusedUnit);
 }
示例#2
0
 public void Init(Unit unit, Camera controlCamera, JoystickFeedbackGizmo feedbackGizmo, StraightWeaponGizmo straightWeaponGizmo)
 {
     _focusedUnit   = unit;
     _feedbackGizmo = feedbackGizmo;
     _joystick      = GetComponent <ScreenJoystick>();
     _joystick.Init(controlCamera);
     _joystick.GetWorldDragStartPointMethod = () => unit.Position;
     _joystick.OnPointerStayEvent           = OnPointerStay;
     _joystick.OnPointerUpEvent             = OnPointerUp;
     _feedbackGizmo.Init(_joystick, unit.transform);
     straightWeaponGizmo.Init(_joystick, _focusedUnit);
 }