using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using asap.core; using cfg; using DG.Tweening; using game; using Game; using GameCore; using TMPro; using UI.Home.Event; using UniRx; using UnityEngine; using UnityEngine.UI; public class HideHomePanelEvent { public bool IsHideMap = true; } public partial class HomePanel : BasePanel { //拖动选择角度 Tables _tables; FishingEventData _fishingEventData; [Header("HomePanel操作相机x=Mathf.Clamp(z,x) y=Mathf.Clamp(w,y)")] public float duration = 0.65f; //屏幕拖动比例 public float dragCameraScale = 0.005f; //重力旋转操作角度限制 public Vector4 gravityAngleLimit = new Vector4(75, 15, 15, -45); //重力旋转游戏角度限制 public Vector4 gravityGameAngleLimit = new Vector4(-2, 0.25f, 2, 2); //拖动旋转角度限制 public Vector4 dragEulerAngleLimit = new Vector4(2, 2, -2, -2); [Range(0, 1)] public float gravitySub = 0.2f; private CanvasGroup canvasGroup; GameObject mask; Animator anim; Vector3 _targetEuler; Vector3 _offsetEuler; Vector3 _curEuler = new Vector3(0, 0, 0); //private Quaternion startQuaternion; //private Quaternion originalQuaternion; private bool _isMoveing = true; bool isMouse = false; private Vector3 _curMousePos; Button btn_questionmark; private UIButton btn_play; Animator btn_play_anim; GameObject effect_beilv_loop; private Button btn_beilv; Image btn_beilv_image; Image buff_beilv_image; GameObject btn_task_gray; GameObject btn_friend_gray; private TMP_Text text_beilv; private CanvasGroup beilvpanel; public Transform beilvpanel_max; public Transform bg_beilvlpanel; private TMP_Text text_beilvpanel_title; private TMP_Text text_beilvpanel_content; //体力进度条 private Image image_slider_energy; //体力当前值/最大值 private TMP_Text text_energy_value; Timer EnergyTimer; public TMP_Text text_energy_time; //目标奖励活动==== HomeBubbleTask homeBubbleTask; //锁链礼包 private Button btn_chainschest; // 锁链礼包按钮 //=====目标奖励活动礼包 HomeGiftBtnPanel homeGift; //=====目标奖励活动礼包 //目标奖励活动==== private RankTargets rankTarget; public Queue imageQueue = new Queue(); public Transform rewardFlyPanel; public RewardItemNew rewardItemPrefab; public Button btn_rank; public Button btn_turntable; GameObject btn_fishbowl; // private Button btn_chainschest; // 锁链礼包 public TMP_Text text_turntable_time; public TMP_Text text_rank_time; public TMP_Text text_rank; public Image rankIcon; Timer rank_timer; Timer showdownTimer; public Button btn_friend; UITopArea top_area; int addGlodCount = 0; private WheelLevel wheelLevel; FishingStage fishingStage; int Energy; HomeBtnRank homeBtnRank; PlayerFishData _playerFishData; HomeBuffPanel homeBuffPanel; HomeLeftPanel homeLeftPanel; HomeRightPanel homeRightPanel; HomeSupplyDropPanel homeSupplyDropPanel; bool isFishingPanel = false; FishingData fishingData; bool isSuperEnergy = false; Canvas RewardFlyPanel; UIDrag moveCameraPanel; int barDataProgress = 0; bool skipFaceAfterRewardPanelClose; private void Awake() { fishingData = GContext.container.Resolve(); panelName = "HomePanel"; fishingStage = GContext.container.ResolveStage("FishingStage") as FishingStage; _offsetEuler = Vector3.zero; GContext.container.Resolve().InitShopPackData(); moveCameraPanel = transform.Find("moveCameraPanel").GetComponent(); mask = transform.Find("mask").gameObject; mask.SetActive(false); _fishingEventData = GContext.container.Resolve(); _playerFishData = GContext.container.Resolve(); top_area = transform.Find("top_area").GetComponent(); beilvpanel_max = transform.Find("DownMiddlePanel/btn_play/beilvpanel/bg_beilv_max").GetComponent(); bg_beilvlpanel = transform.Find("DownMiddlePanel/btn_play/beilvpanel/bg_beilv").GetComponent(); text_energy_time = transform.Find("DownMiddlePanel/bg_info/text_info").GetComponent(); var supplyDropGO = transform.Find("DownMiddlePanel/SupplyDrop"); if (supplyDropGO != null) homeSupplyDropPanel = supplyDropGO.GetComponent(); var bubbleTaskGO = transform.Find("safearea/MiddlePanel/btn_bubble_task"); if (bubbleTaskGO != null) homeBubbleTask = bubbleTaskGO.GetComponent(); var chainschestGO = transform.Find("safearea/LeftPanel/layout/btn_offerchainschest"); if (chainschestGO != null) btn_chainschest = chainschestGO.GetComponent