public async Task <JsonGunState> GetWeapons() { await ConnectToContract(); Debug.Log("itemOwernship getWeapons"); GetWeaponsOutput result = await this.contract.StaticCallDtoTypeOutputAsync <GetWeaponsOutput>("getWeapons"); JsonGunState jsonGunState = JsonUtility.FromJson <JsonGunState>(result.state); Debug.Log(jsonGunState.guns); return(jsonGunState); }
public async Task <JsonGunState> getUnownedWeaponList() { await ConnectToContract(); Debug.Log("getUnownedWeaponList"); GetWeaponsOutput result = await this.contract.StaticCallDtoTypeOutputAsync <GetWeaponsOutput>("getWeaponList"); Debug.Log(result.state); JsonGunState jsonGunState = JsonUtility.FromJson <JsonGunState>(result.state); return(jsonGunState); }