Beispiel #1
0
    public static ItemRepresentation CreateItem(InventoryItem item, Vector3 SpawnAt, Vector3 forceVector)
    {
        ItemRepresentation go = Instantiate(ObjectFactory.instance.ItemRepresentation, SpawnAt, Quaternion.identity).GetComponent <ItemRepresentation>();

        go.Init(item);
        go.GetComponent <Rigidbody>().AddForce(forceVector, ForceMode.Impulse);

        return(go);
    }