コード例 #1
0
ファイル: HeroLogic.cs プロジェクト: yuchenwuhen/skillEditor
        public HeroLogic(Data.Hero data)
        {
            this.Data            = data;
            this.State           = new DataDrive_Service();
            this.TempAttribute   = new DataDrive_Service();
            this.DefaultAttibute = new DataDrive_Service();
            BuffProcess          = new BuffProcess(this);

            //注册所有属性
            foreach (var name in data.AttributeName)
            {
                this.DefaultAttibute.RegisterData(name);
            }
            //
            //Graphic = new HeroGraphic(this.Data);
        }
コード例 #2
0
    void ChangeDescription(Data.Hero hero)
    {
        ClassSpecDescription.tr.position = new Vector3(10000, ClassSpecDescription.initPos.y, ClassSpecDescription.initPos.z);
        tr.position = initPos;

        icon.sprite    = hero.miniIcon;
        priceText.text = hero.price.ToString();
        specText.text  = "";
        for (int i = 0; i < hero._specs.Count; i++)
        {
            if (i > 0)
            {
                specText.text += ", ";
            }
            specText.text += hero._specs[i].ToString();
        }
        classText.text = hero._class.ToString();
        nameText.text  = hero.name;
    }
コード例 #3
0
 public HeroGraphic(Data.Hero data)
 {
     this.data = data;
 }