Esempio n. 1
0
        //タップ位置
        //Tweenはなし
        public void MoveToTapAttack(BCharacterAttackerBase attackCharacter, Vector3 targetPosition, float changeTimeTapMode)
        {
            var centerPosition = (targetPosition - attackCharacter.transform.position) / 2;
            var newPosition    = attackCharacter.transform.position + centerPosition;

            transform.position    = newPosition + attackCamera[(int)CameraState.TapAttack].position;
            transform.eulerAngles = new Vector3(attackCamera[(int)CameraState.TapAttack].rotation.x, GetInverseRotationFromFrontMode() + attackCamera[(int)CameraState.TapAttack].rotation.y, attackCamera[(int)CameraState.TapAttack].rotation.z);

            //iTween.MoveTo(gameObject, iTween.Hash("x", newPosition.x + attackCamera[(int)CameraState.TapAttack].position.x, "y", newPosition.y + attackCamera[(int)CameraState.TapAttack].position.y, "z", newPosition.z + attackCamera[(int)CameraState.TapAttack].position.z,
            //           "time", changeTimeTapMode));
            //iTween.RotateTo(gameObject, iTween.Hash("x", attackCamera[(int)CameraState.TapAttack].rotation.x, "y", GetInverseRotationFromFrontMode() + attackCamera[(int)CameraState.TapAttack].rotation.y, "z", attackCamera[(int)CameraState.TapAttack].rotation.z, "time", changeTimeTapMode, "islocal", true));
        }
Esempio n. 2
0
 public void MoveToAutoAttack(BCharacterAttackerBase attackCharacter, Vector3 targetPosition)
 {
     MoveToTapAttack(attackCharacter, targetPosition, 0);
 }