/// <summary> /// Places gridObjects (Drops and Portals) on the map at the appropriate positions. /// </summary> public void FillMapWithObjects() { foreach (KeyValuePair<GridLocation, Cell> kvp in this.mapCells) { // Current level only if (kvp.Key.Level != CurrentLevel) continue; if (kvp.Value.HasAttribute(CellAttributes.HasDrop)) { OozeDrop drop = new OozeDrop(); drop.Create(new GPS(kvp.Key)); ++dropsCount[kvp.Key.Level]; } if (kvp.Value.HasOption(CellOptions.Portal)) { Portal portal = new Portal(); portal.Create(new GPS(kvp.Key)); portal.SetDestination(GetCell(kvp.Value.OptionValue)); } } }
/// <summary> /// Handles process of picking up a <see cref="OozeDrop"/> object. /// </summary> /// <param name="drop"></param> public void CollectDrop(OozeDrop drop) { AddPoints(10); OozeEnergy += 10; Map.Instance.CollectDrop(drop); ++collectedDropsCount; }
/// <summary> /// Processes picking up the Drop on the map by the <see cref="Slug"/>. /// </summary> /// <param name="drop">The reference to an Drop object that has been collected.</param> public void CollectDrop(OozeDrop drop) { --dropsCount[CurrentLevel]; }