コード例 #1
0
    //設定
    public void Setting(NamakemonoData nd)
    {
        //画像の設定
        Sprite s = Resources.Load <Sprite>("Image/Monster/" + nd.No.ToString());

        this.GetComponent <Image>().sprite = s;
        //攻撃力
        attackPower = nd.GetAttackPower();
    }
コード例 #2
0
 //画像などのセットアップを行う
 public void SetUp(NamakemonoData nd)
 {
     namakemonoData = nd;
     if (nd.No == 0)
     {
         PlayerSetup();
         return;
     }
     imgIcon.GetComponent <Image>().sprite         = Resources.Load <Sprite>("Image/Monster/" + nd.No.ToString());
     txtName.GetComponent <Text>().text            = nd.name + ((nd.plus == 0)?"":" +" + nd.plus.ToString());
     txtLevel.GetComponent <Text>().text           = nd.level.ToString();
     txtNextNeededApple.GetComponent <Text>().text = nd.GetNextNeededApple().ToString();
     txtAttack.GetComponent <Text>().text          = "ATK:" + nd.GetAttackPower().ToString();
 }