Ejemplo n.º 1
0
 private void Awake()
 {
     ptp = transform.parent.transform.parent.gameObject.GetComponent <PlayerTankParameter>();
     this.shotSpeedMagni  = ptp.GetShotSpeedMagni();
     this.ableBeBulletNum = ptp.GetShotAbleBulletNum();
     tm = this.transform.root.gameObject.GetComponent <TankMovement>();
 }
Ejemplo n.º 2
0
    private void Awake()
    {
        ptp                  = selectTankObject.GetComponent <PlayerTankParameter>();
        psui                 = transform.parent.transform.parent.gameObject.GetComponent <PlayerSelectUI>();
        lifeNumText          = parameterPanel.transform.Find("Life").gameObject.GetComponent <Text>();
        moveSpeedText        = parameterPanel.transform.Find("MoveSpeed").gameObject.GetComponent <Text>();
        shotSpeedText        = parameterPanel.transform.Find("ShotSpeed").gameObject.GetComponent <Text>();
        bulletNumText        = parameterPanel.transform.Find("BulletNum").gameObject.GetComponent <Text>();
        descriptionText      = parameterPanel.transform.Find("Description").gameObject.GetComponent <Text>();
        announceText         = parameterPanel.transform.Find("Announce").gameObject.GetComponent <Text>();
        releaseConditionText = parameterPanel.transform.Find("ReleaseCondition").gameObject.GetComponent <Text>();

        int moveS = (int)(ptp.GetMoveSpeedMagni() * 100);
        int shotS = (int)(ptp.GetShotSpeedMagni() * 100);

        if (moveS % 5 != 0)
        {
            moveS++;
        }
        if (shotS % 5 != 0)
        {
            shotS++;
        }

        lifeNum     = "ライフ: " + ptp.GetLifeNum();
        moveSpeed   = "移動速度: " + moveS;
        shotSpeed   = "発射速度: " + shotS;
        bulletNum   = "装弾数: " + ptp.GetShotAbleBulletNum();
        description = "特徴: " + ptp.GetDescription();
        if (ptp.GetTankNumber() >= 21 && PlayerPrefs.GetInt("UseableTank" + ptp.GetTankNumber(), 0) == 0)
        {
            releaseCondition = ptp.GetReleaseCondition();
        }
        else if (MainGameController.gameNumber == 2)
        {
            announce = ptp.GetAnnounce();
        }
    }
Ejemplo n.º 3
0
 private void Awake()
 {
     ptp        = transform.gameObject.GetComponent <PlayerTankParameter>();
     moveSpeed *= ptp.GetMoveSpeedMagni();
 }