Example #1
0
 public Player(int id, int hp, int currentHp, int entityPosX, int entityPosY, AttackWeapon attWeapon, Potion healthPotion) : base(id, hp, entityPosX, entityPosY)
 {
     CurrentWeapon = new AttackWeapon();
     HealthPotion  = healthPotion;
     EntityState   = State.Alive;
     entityPosX    = 1;
     entityPosY    = 1;
     hp            = 100;
 }
Example #2
0
 //RigitBody,Animator,武器のオブジェクトを取得
 void Start()
 {
     rb           = GetComponent <Rigidbody>();
     anim         = GetComponent <Animator>();
     weaponscript = WeaponObj.GetComponent <AttackWeapon>();
 }
        public static AttackWeapon MakeAttackWeapon(int damage, int defend, bool isUsed, int inventorySlot, TypeOfWeapons weapon)
        {
            AttackWeapon attack = new AttackWeapon(damage, defend, isUsed, inventorySlot);

            return(attack);
        }