internal Player(Client c, World w) { world = w; physics = new Physics(new EntityLocation(world.Spawn.playerLocation), this, PhysicsType.Gravity); client = c; WindowManager = new PlayerWindowManager(this); }
internal BlockLocation BL; //This is only set if we have a BLOCK that has a window internal bool Click(short SN,byte button,byte Mode,SLOT CI,PlayerWindowManager PWM) { return(WindowType.Click(SN,button,Mode,CI,this,PWM)); }
/// <summary> /// This method is called when a player clicks on the window /// </summary> /// <param name="SlotNumber">The index of the slot that was clicked by the player</param> /// <param name="bytton">The button parameter that the player clicked with</param> /// <param name="mode">The mode this players click is in</param> /// <param name="CI">The CurrentItem that the player has clicked (what is currently in that slot in the players window, if it does not match what SHOULD be in it, we should have already returned false</param> /// <param name="w">The WINDOW class that this click is referring to, you can get most of the information you need about the window here, any changes here will be pushed to all players that have this same window open, assuming its a crossplayer window</param> /// <param name="PWM">The PlayerWindowManager class that this click was called from, in this class you can get the information for the SLOT attached to the cursor and information on the player</param> /// <returns>This should return a bool as to whether or not this transaction has completed succesfully, return false to reject this transaction (in which case no changes should be made to the inventory.</returns> public abstract bool Click(short SlotNumber,byte button,byte mode,SLOT CI,Window w,PlayerWindowManager PWM);
internal Inventory(Player player,PlayerWindowManager pwm) //Constructor { Owner = player; PWM = pwm; }