咳……又是自己摸索……
( Q; m" Y; I$ q! v* G/ jsel = SwarmUtils.getSelector("FoodSpace", "seedFood");& G! Z$ M6 u( G' R0 W
worldRaster.setButton$Client$Message(1, modelSwarm.getFood(), sel);& G6 S8 e6 |2 h$ f
+ m6 h0 ]0 X! a8 j& R5 l' s; S其中FoodSpace的seedFood函数:
2 {3 Q4 A( g" U$ {1 upublic Object seedFood(int x, int y) {
+ M8 Y$ M7 `' ^$ r putValue$atX$Y(1, x, y);
6 T% j8 q/ B9 j" k: D* u return this;$ U+ N2 B1 S- b. D) V. w2 J
} |