Sorry for all the questions, but here we go:
I have a class,
public class Property. It represents a house. I have three public methods for creating different types of houses. The code for the most used struct (a player owned house) is as follows:
PHP код:
public Property(int dbID, float x, float y, float z, string name, trinityRPG.Definitions.PropertyType type, string owner, float interiorx, float interiory, float interiorz, int interiorid)
{
createPickup(x, y, z, type);
createLabel(x, y, z, "Property: " + name + "\n Owner: " + owner);
this.ownerName = owner;
this.databaseID = dbID;
this.interiorID = interiorid;
this.interiorx = interiorx;
this.interiory = interiory;
this.interiorz = interiorz;
}
The
createPickup and
createLabel methods are private methods for rendering the pickup and 3dtextlabel, both using the Streamer Wrapper.
PHP код:
private void createPickup(float x, float y, float z, trinityRPG.Definitions.PropertyType type)
{
int modelid = (int)type;
var createdPickup = new DynamicPickup(modelid, 1, new Vector(x, y, z), 100f);
createdPickup.PickedUp += (sender, args) =>
{
Console.WriteLine("The pickup was picked up.");
};
}
My problem: whenever someome picks up the DynamicPickup, nothing happens! How would I go about fixing that?