/** * Interface for Context Aware Box used to generate activation tiles for item activation * * Arguments * - Player player - The player * - Item item - The item */ public void GeneratorInterface(Player newPlayer, Item newItem) { double itemRange = newItem.GetRange(); // The item's range /* The X and Z Coordinates of the calling player */ int playerPositionX = newPlayer.PlayerPosition().X * 2; int playerPositionZ = newPlayer.PlayerPosition().Z * 2; RangeType rangeType = newItem.GetRangeType(); ActivationType activationType = newItem.GetActivationType(); // First, destroy previous activation tiles DestroyActivationTiles(); // Second, set references to item. Set ability to be null item = newItem; ability = null; // Third, start generating generateActivationTiles(itemRange, playerPositionX, playerPositionZ, rangeType, activationType); }