咳……又是自己摸索……
% E% w6 r1 E( x% }sel = SwarmUtils.getSelector("FoodSpace", "seedFood");, Y4 Z4 @, s6 k: m* D
worldRaster.setButton$Client$Message(1, modelSwarm.getFood(), sel);% e7 t* C1 W# T5 x/ s& `! g7 i. W$ V
. K. k# ]+ j5 I2 w其中FoodSpace的seedFood函数:
& b$ p/ m B! g$ H1 U4 cpublic Object seedFood(int x, int y) {
9 f1 }5 ]8 i: u2 q, X# ` putValue$atX$Y(1, x, y);+ X; W& h' F1 b$ c$ D) ?
return this;
7 V2 Y9 T; g2 W } |