using asap.core;
using DG.Tweening;
using game;
using GameCore;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
using UniRx;
using cfg;
using System.Collections;
using System.Collections.Generic;
public class BuildingData
{
public float upgradeTime;
public int curStep;
public string CurrentPrefab;
public int areaStepCount;
public int turnOffTimeScale;
//public int rewardQCount;
///
/// 以下是下一步的数据
///
public bool isConstructionCost;
public int required;
public ulong NextUpgradeCost;
public List benefitsLevel;
public string Icon;
public string Title_l10n_key;
public List DisplaySwitch;
public int Rewards;
public int NextStep;
public int NextStepCount;
public int NextTimelineId;
public float NextStartTime;
public float NextDuration;
public string NextPrefab;
}
public class CampPanel : BasePanel
{
PlayerData _playerData;
CanvasGroup canvasGroup;
Animator animator;
public TextMeshProUGUI campName;
public TextMeshProUGUI areaInfo;
public TextMeshProUGUI text_progress;
string text_progress_string = "0/0";
public TextMeshProUGUI cost;
GameObject costRoot;
TMP_Text text_cost_buff;
TMP_Text text_old;
public RewardItemNew[] bg_reward; Image[] rewardBg;
public Image costIcon;
public Image currentWorkIcon;
GameObject barGo1;
GameObject barGo2;
GameObject barGo3;
Image bar1;
Image bar2;
Image bar3;
public Image currentBar;
CanvasGroup DownPanel;
UIButton upgradeButton;
GameObject btn_icon;
GameObject btn_fix;
Animator upButtonAni;
public UIDrag uiDrag;
public Button btn_close;
Button btn_right;
Animation camp_target;
public RectTransform areaIconParent;
public Image[] areaIcons;
public GameObject done1;
CampDataMM _campData;
CanvasGroup top_area_canvas;
float _upgradeTime;
bool _isUpgrading;
ulong _upgradeCost;
bool isStart = false;
bool isdrag = false;
bool fixIng = false;
private Coroutine dragWith;
GameObject particle;
GameObject kuang;
bool IsDowning = false;
bool IsDowning1 = false;
Coroutine startTimer;
TMP_Text text_name;
//TMP_Text text_map_name;
//TMP_Text text_comingsoon;
Button btn_go;
GameObject btn_p_text;
GameObject btn_text_confirm;
bool isCampPanel_fade = false;
System.IDisposable idis = null;
List levelItemDatas;
Tables _table;
float buildingSpeed = 1;
float maxSpeed = 1.5f;
int rewardLen = 0;
Queue buildingDatas = new Queue();
private void Awake()
{
top_area_canvas = transform.Find("top_area").GetComponent();
_table = GContext.container.Resolve();
maxSpeed = 1 + _table.TbGlobalConfig.TimeScalePerStep * _table.TbGlobalConfig.AccMaxStep;
_playerData = GContext.container.Resolve();
canvasGroup = GetComponent();
animator = GetComponent();
particle = transform.Find("top_area/particle").gameObject;
campName = transform.Find("safearea/LeftPanel/stage/text_stage").GetComponent();
areaInfo = transform.Find("safearea/MiddlePanel/camp_target/bg_bar/text_areaInfo").GetComponent();
text_progress = transform.Find("safearea/MiddlePanel/camp_target/bg_bar/bg_progress/text_progress").GetComponent();
costRoot = transform.Find("safearea/DownPanel/btn_construct/CostRoot").gameObject;
cost = transform.Find("safearea/DownPanel/btn_construct/CostRoot/text_cost").GetComponent();
text_cost_buff = transform.Find("safearea/DownPanel/btn_construct/CostRoot/text_cost_buff").GetComponent();
text_old = transform.Find("safearea/DownPanel/btn_construct/CostRoot/text_cost_buff/text_old").GetComponent();
bg_reward = transform.Find("safearea/MiddlePanel/camp_target/reward").GetComponentsInChildren();
rewardBg = new Image[bg_reward.Length];
for (int i = 0; i < bg_reward.Length; i++)
{
rewardBg[i] = bg_reward[i].transform.Find("bg").GetComponent();
}
camp_target = transform.Find("safearea/MiddlePanel/camp_target").GetComponent();
costIcon = transform.Find("safearea/DownPanel/btn_construct/CostRoot/text_cost/icon_cost").GetComponent();
barGo1 = transform.Find("safearea/MiddlePanel/camp_target/bg_bar/bar1").gameObject;
barGo2 = transform.Find("safearea/MiddlePanel/camp_target/bg_bar/bar2").gameObject;
barGo3 = transform.Find("safearea/MiddlePanel/camp_target/bg_bar/bar3").gameObject;
bar1 = transform.Find("safearea/MiddlePanel/camp_target/bg_bar/bar1/bar").GetComponent();
bar2 = transform.Find("safearea/MiddlePanel/camp_target/bg_bar/bar2/bar").GetComponent();
bar3 = transform.Find("safearea/MiddlePanel/camp_target/bg_bar/bar3/bar").GetComponent();
DownPanel = transform.Find("safearea/DownPanel").GetComponent();
upgradeButton = transform.Find("safearea/DownPanel/btn_construct").GetComponent();
upButtonAni = transform.Find("safearea/DownPanel/btn_construct").GetComponent();
btn_icon = transform.Find("safearea/DownPanel/btn_construct/icon").gameObject;
btn_fix = transform.Find("safearea/DownPanel/btn_construct/fix").gameObject;
uiDrag = transform.Find("safearea/Image").GetComponent();
btn_close = transform.Find("safearea/DownPanel/btn_close").GetComponent