예제 #1
0
 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;
 }
예제 #2
0
 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;
 }
예제 #3
0
 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;
 }