Exemple #1
0
 void Start()
 {
     tmpAxis    = Vector2.zero;
     OldTmpAxis = Vector2.zero;
     axisX.InitAxis();
     axisY.InitAxis();
 }
Exemple #2
0
 public override void Start()
 {
     base.Start();
     tmpAxis    = Vector2.zero;
     OldTmpAxis = Vector2.zero;
     axisX.InitAxis();
     axisY.InitAxis();
 }
    void Start()
    {
        tmpAxis    = Vector2.zero;
        OldTmpAxis = Vector2.zero;

        axisX.InitAxis();
        axisY.InitAxis();
        noReturnPosition = thumb.position;
    }
Exemple #4
0
    void Start()
    {
        tmpAxis    = Vector2.zero;
        OldTmpAxis = Vector2.zero;
        touchIds   = new List <TouchInfo>();

        axisX.InitAxis();
        axisY.InitAxis();
        axisCenter.InitAxis();
    }
Exemple #5
0
    void Start()
    {
        tmpAxis    = Vector2.zero;
        OldTmpAxis = Vector2.zero;

        axisX.InitAxis();
        axisY.InitAxis();
        noReturnPosition = thumb.position;
        GetComponent <RectTransform>().localPosition = new Vector3(-464f, -226f, 0f);
    }
Exemple #6
0
    public override void Start()
    {
        axis.InitAxis();
        base.Start();
        isOnPress = false;

        if (allowSimulationStandalone && enableKeySimulation && !Application.isEditor)
        {
            SetVisible(visibleOnStandalone);
        }
    }
Exemple #7
0
    void Start()
    {
        tmpAxis      = Vector2.zero;
        OldTmpAxis   = Vector2.zero;
        curTmpCount  = 0;
        tmpCount     = 2;
        oldDirection = PlayerDirection.Down;
        tmpDirection = PlayerDirection.Down;

        axisX.InitAxis();
        axisY.InitAxis();
        sourceAnchoredPosition = cachedRectTransform.anchoredPosition;
    }
Exemple #8
0
    public override void Start()
    {
        base.Start();

        tmpAxis    = Vector2.zero;
        OldTmpAxis = Vector2.zero;

        axisX.InitAxis();
        axisY.InitAxis();

        if (allowSimulationStandalone && enableKeySimulation && !Application.isEditor)
        {
            SetVisible(visibleOnStandalone);
        }
    }
Exemple #9
0
    void Start()
    {
        tmpAxis    = Vector2.zero;
        OldTmpAxis = Vector2.zero;

        axisX.InitAxis();
        axisY.InitAxis();
        noReturnPosition = thumb.position;

        pointId = -1;

        if (joystickType == JoystickType.Dynamic)
        {
            visible = false;
        }
    }
    public override void Start()
    {
        Character.Speed = tmSpeed;

        axisX.InitAxis();
        axisY.InitAxis();

        if (enableCamera)
        {
            InitCameraLookAt();
        }

        tmpAxis    = Vector2.zero;
        OldTmpAxis = Vector2.zero;

        noReturnPosition = thumb.position;

        pointId = -1;

        if (joystickType == JoystickType.Dynamic)
        {
            visible = false;
        }

        base.Start();

        // Init Camera position
        if (enableCamera && cameraMode == CameraMode.SmoothFollow)
        {
            if (cameraTransform && cameraLookAt)
            {
                cameraTransform.position = cameraLookAt.TransformPoint(new Vector3(0, followHeight, -followDistance));
                cameraTransform.LookAt(cameraLookAt);
            }
        }

        if (enableCamera && cameraMode == CameraMode.Follow)
        {
            if (cameraTransform && cameraLookAt)
            {
                cameraTransform.position = cameraLookAt.position + followOffset;
                cameraTransform.LookAt(cameraLookAt.position);
            }
        }
    }