Texture2D writeGateWayPosition(Texture2D tex, GateWayEntity[] gateways) { int x, y; Color c = GateWay; foreach (GateWayEntity gate in gateways) { Debug.logger.Log("writeGateWayPos:",gate.Position); if (!gate.IsDetected) continue; x = (int)gate.Position.x; y = (int)gate.Position.y; tex.SetPixel(x, y, c); } tex.Apply(false); return tex; }
public static GateWayEntity[] getAllGateWays() { var ret = new GateWayEntity[GateWays.childCount]; int i = 0; foreach (Transform t in GateWays.transform) { ret[i++] = t.GetComponent<GateWayEntity>(); } return ret; }
public static GateWayEntity[] getGateWays() { GateWayEntity[] gateways = new GateWayEntity[GateWays.childCount]; int i = 0; foreach (Transform g in GateWays.transform) { gateways[i++] = g.GetComponent<GateWayEntity>(); } return gateways; }
public SelectedGateWayUseMenu(GateWayEntity gateway, PlayerController owner, Vector2 pos) : base(gateway.Entity, owner, pos, new Vector2(1, 1), "SelectedGateWayUse") { setMenuLabels(); GateWay = gateway; }