Пример #1
0
    public void LoadStatus(SaveData LoadData)
    {
        Name      = new Name(LoadData.Name);
        Lv        = new Lv(LoadData.Lv);
        Hp        = new Hp(LoadData.MaxHp, LoadData.CurrentHp);
        Mp        = new Mp(LoadData.MaxMp, LoadData.CurrentMp);
        Str       = new Str(LoadData.Str);
        Vit       = new Vit(LoadData.Vit);
        Dex       = new Dex(LoadData.Dex);
        Int       = new Int(LoadData.Int);
        Exp       = new Exp(LoadData.NextExp, LoadData.CurrentExp);
        MoveSpeed = new MoveSpeed(3, 1);

        Direction = new Direction(Animator);

        ChargeSkill = new SwordChargeAtack();
        NormalAtack = new SwordNomalAtack();
        Skill       = NormalAtack;
        Charge      = GameObject.transform.Find("tame").GetComponent <Charge>();
        Weapon      = (GameObject)Resources.Load("prefab/Weapon/Sword");
        Equip       = new Equip();

        Equip.Weapon(LoadData.EquipWeapon);
        Equip.Head(LoadData.EquipHead);
        Equip.Body(LoadData.EquipBody);
        Equip.Hand(LoadData.EquipHand);
        Equip.Foot(LoadData.EquipFoot);
        Equip.Accessory(LoadData.EquipAccessory);
    }
Пример #2
0
 // Update is called once per frame
 void Update()
 {
     Debug.Log("name: " + name.text);
     str.text        = Str.ToString();
     def.text        = Def.ToString();
     vit.text        = Vit.ToString();
     spd.text        = Spd.ToString();
     pointsLeft.text = pointsleft.ToString();
 }
Пример #3
0
 public void LvUp()
 {
     Lv.LvUp();
     Hp.LvUp(10);
     Mp.LvUp(5);
     Str.LvUp(5);
     Vit.LvUp(5);
     Dex.LvUp(3);
     Int.LvUp(1);
     DataManager.Save();
 }
Пример #4
0
 // Use this for initialization
 void Awake()
 {
     Str             = 10;
     Def             = 10;
     Vit             = 10;
     Spd             = 10;
     pointsleft      = 15;
     str.text        = Str.ToString();
     def.text        = Def.ToString();
     vit.text        = Vit.ToString();
     spd.text        = Spd.ToString();
     pointsLeft.text = pointsleft.ToString();
 }
Пример #5
0
 RedSlime()
 {
     Name          = new Name("レッドスライム");
     Lv            = new Lv(5);
     Hp            = new Hp(20, 20);
     Mp            = new Mp(0, 0);
     Str           = new Str(20);
     Vit           = new Vit(20);
     Exp           = 10;
     Gold          = 10;
     DropItem      = 0;
     MoveSpeed     = 1;
     MoveStatus    = 0;
     AtackWaitTime = 1f;
     DeathCheck    = false;
     AtackOn       = false;
     MoveOn        = false;
     MoveOnX       = 0;
     MoveOnY       = 0;
 }
Пример #6
0
    public void NewGame(string name)
    {
        Name      = new Name(name);
        Lv        = new Lv(1);
        Hp        = new Hp(50, 50);
        Mp        = new Mp(10, 10);
        Str       = new Str(1);
        Vit       = new Vit(1);
        Dex       = new Dex(1);
        Int       = new Int(1);
        Exp       = new Exp(100, 0);
        MoveSpeed = new MoveSpeed(3, 1);

        Equip = new Equip();

        Direction = new Direction(Animator);

        Weapon = (GameObject)Resources.Load("prefab/Weapon/Sword");

        ChargeSkill = new SwordChargeAtack();
        NormalAtack = new SwordNomalAtack();
        Skill       = NormalAtack;
        Charge      = GameObject.transform.Find("tame").GetComponent <Charge>();
    }