Example #1
0
    //初始化
    public void Init()
    {
        //初始化HP
        HP                   = hero.MaxHP;
        HPText.text          = HP + "/" + hero.MaxHP;
        HPSlider.value       = 1f;
        heroHeadImage.sprite = hero.headSprite;

        //初始化AP
        AP = 3;
        for (int i = 0; i < 3; i++)
        {
            GameObject GOAPBall = Instantiate(APBall) as GameObject;
            GOAPBall.transform.parent = APBar.transform;
            ListAPBall.Add(GOAPBall);
        }

        //物体获取
        roundManager = GameObject.Find("RoundManager").GetComponent <RoundManager>();
        enemyHCurved = GameObject.Find("EnemyHCPrefab").GetComponent <EnemyHCurved>();
        cardCurved   = GameObject.Find("HandCardPrefab").GetComponent <CardCurved>();
        I_Hyp        = GameObject.Find("Hypovolemia").transform;
        cardEffect   = GameObject.Find("AllCardEffect").GetComponent <CardEffect>();

        //初始值
        saveAp      = 0;
        burnDamage  = 0;
        darkfire    = false;
        awakeIsOpen = false;
        HeroTimer   = 0;
        AwakeTimer  = 0;
    }
Example #2
0
    private EnemyHCurved enemyHCurved; //对方手牌

    private void Start()
    {
        myPlayer     = GameObject.Find("MainUI").GetComponent <PlayerManager>();
        enemyPlayer  = GameObject.Find("EnemyUI").GetComponent <PlayerManager>();
        cardCurved   = GameObject.Find("HandCardPrefab").GetComponent <CardCurved>();
        enemyHCurved = GameObject.Find("EnemyHCPrefab").GetComponent <EnemyHCurved>();
        roundManager = GameObject.Find("RoundManager").GetComponent <RoundManager>();
    }
Example #3
0
 // Start is called before the first frame update
 void Start()
 {
     //物体获取
     roundManager    = GameObject.Find("RoundManager").GetComponent <RoundManager>();
     heroAwakeCurved = GameObject.Find("HeroAwakePrefab").GetComponent <HeroAwakeCurved>();
     enemyHCurved    = GameObject.Find("EnemyHCPrefab").GetComponent <EnemyHCurved>();
     cardEffect      = GameObject.Find("AllCardEffect").GetComponent <CardEffect>();
     showingCard     = GameObject.Find("EnemyShowCardParent").GetComponent <EnemyShowCard>();
 }
Example #4
0
    public int addDamage;//附加伤害

    private void Start()
    {
        cardEffect    = GameObject.Find("AllCardEffect").GetComponent <CardEffect>();
        enemyShowCard = GameObject.Find("EnemyShowCardParent").GetComponent <EnemyShowCard>();
        cardCurved    = GameObject.Find("HandCardPrefab").GetComponent <CardCurved>();
        enemyHCurved  = GameObject.Find("EnemyHCPrefab").GetComponent <EnemyHCurved>();

        delayAttack = false;
        addDamage   = 0;
    }
Example #5
0
    //游戏初始化赋值
    public void RoundGoingStart()
    {
        roundPhase  = RoundPhase.Preparatory;
        waitCounter = WaitPhase.NoWait;
        roundNum    = 0;

        myPlayer       = GameObject.Find("MainUI").GetComponent <PlayerManager>();
        EnemyPlayer    = GameObject.Find("EnemyUI").GetComponent <PlayerManager>();
        cardCurved     = GameObject.Find("HandCardPrefab").GetComponent <CardCurved>();
        enemyHCurved   = GameObject.Find("EnemyHCPrefab").GetComponent <EnemyHCurved>();
        RoundNumText   = GameObject.Find("RoundNumText").GetComponent <Text>();
        skillButtonGet = GameObject.Find("MainUI").GetComponent <SkillButtonGet>();
        skillManager   = GameObject.Find("SkillManager").GetComponent <SkillManager>();
    }
Example #6
0
 // Start is called before the first frame update
 void Start()
 {
     showingCard  = GameObject.Find("EnemyShowCardParent").GetComponent <EnemyShowCard>();
     roundManager = GameObject.Find("RoundManager").GetComponent <RoundManager>();
     enemyHCurved = GameObject.Find("EnemyHCPrefab").GetComponent <EnemyHCurved>();
 }