Esempio n. 1
0
 private void OnSkillFingerEvent(FingerEvent finger)
 {
     if (SupportRotateByHold && IsExecuting() && "OnTwoFingerMove" == finger.Name)
     {
         TargetPos = finger.GetTouchToWorldPoint();
         AdjustTargetPos();
     }
     if (SupportRotateByHold && IsExecuting() && "OnTwoFingerDown" == finger.Name)
     {
         TargetPos = finger.GetTouchToWorldPoint();
         AdjustTargetPos();
     }
 }
Esempio n. 2
0
    private static GestureArgs ToGestureArgs(FingerEvent args)
    {
        if (null == args)
        {
            return(null);
        }
        GestureArgs e = new GestureArgs();

        e.startPositionX = args.Position.x;
        e.startPositionY = args.Position.y;
        e.positionX      = args.Position.x;
        e.positionY      = args.Position.y;

        e.startTime   = UnityEngine.Time.time;
        e.elapsedTime = 0;
        UnityEngine.Vector3 pos = args.GetTouchToWorldPoint();
        e.gamePosX = pos.x;
        e.gamePosY = pos.y;
        e.gamePosZ = pos.z;
        e.name     = args.Name;

        UnityEngine.GameObject go      = LogicSystem.PlayerSelf;
        UnityEngine.Vector3    srcPos  = pos;
        UnityEngine.Vector3    destPos = pos;
        if (null != go)
        {
            destPos = go.transform.position;
        }
        e.towards = Geometry.GetYAngle(new ArkCrossEngine.Vector2(destPos.x, destPos.z), new ArkCrossEngine.Vector2(srcPos.x, srcPos.z));

        e.moveType = curTouchState;

        return(e);
    }
Esempio n. 3
0
 private void OnSkillFingerEvent(FingerEvent finger)
 {
     if (m_IsEnterMissle && IsExecuting() && "OnFingerMove" == finger.Name)
     {
         //Debug.Log("OnSkillFingerEvent OnFingerMove!");
         TargetPos = finger.GetTouchToWorldPoint();
         //TriggerImpl.SetFacePos(this.gameObject, TargetPos);
         CreateMissle(TargetPos, true);
     }
     if (m_IsEnterMissle && IsExecuting() && "OnFingerDown" == finger.Name)
     {
         //Debug.Log("OnSkillFingerEvent SupportHoldSkillByFinger OnFingerDown!");
         TargetPos = finger.GetTouchToWorldPoint();
         //TriggerImpl.SetFacePos(this.gameObject, TargetPos);
         CreateMissle(TargetPos, false);
     }
 }
Esempio n. 4
0
 private void OnSkillFingerEvent(FingerEvent finger)
 {
     if (!IsActive() || m_ExSkillState != ExSkillState.kHolding)
     {
         return;
     }
     if ("OnFingerDown" == finger.Name)
     {
         Vector3           targetPos = finger.GetTouchToWorldPoint();
         List <GameObject> objs      = finger.GetRayObjectsByLayerName("Character");
         DamageObjects(objs);
     }
     if ("OnFingerMove" == finger.Name)
     {
         Vector3           targetPos = finger.GetTouchToWorldPoint();
         List <GameObject> objs      = finger.GetRayObjectsByLayerName("Character");
         DamageObjects(objs);
     }
 }