|
|
如题,即如果store中存放有4种entity分别为part1,part2,part3,part4,每次需移动数量分别为4,3,1,1。按下面语句是否可行,不知道怎修改,或者类似语句该如何编写,向大家求救。4 @! }: i; Z! `9 y
is * X5 ~) G% _4 B$ X
a,b:integer;
8 d7 d6 }% F% bdo
! @# B- R$ c ?, s if store.cont.name="part1" then
* z& q2 D. M4 L4 e# P5 X, Y for a:=1 to 4 loop% S, q: x+ q2 N" L. O x
store.cont.move;
# V- u& F# t! i' g" i0 @ next;2 _0 K, Q n$ H& a Q) ~! P
elseif store.cont.name="part2" then( j1 a6 @ n. E) c0 ?
for b:=1to 3 loop& E }0 J8 E5 g5 g% K# B
store.cont.move;+ o0 T; T A+ ?( P& q6 U- @
next;2 h2 l3 S w* Y" w# m; G' M! _
elseif store.cont.name="part3" then- L X) u4 M: d H' F( x
store.cont.move;+ ^# V8 i( t6 _) |" a4 b
elseif store.cont.name="part4" then: N3 A) c0 e- B0 u7 x% x" y# i
store.cont.move;
' D8 P% D# D/ z1 K, t end;: Y$ u: G7 ` ^" r6 ^
end; |
|