|
楼主 |
发表于 2010-1-1 17:33:53
|
显示全部楼层
要是很正的弧形,只能是动态生成了,分亨一下吧
[jass]function CreateHero takes nothing returns nothing
real x,y
integer i
LightHeroId[0] = HERO_PAL
LightHeroId[1] = HERO_AM
LightHeroId[2] = HERO_MK
LightHeroId[3] = HERO_BS
LightHeroId[4] = HERO_LS
LightHeroId[5] = HERO_KOG
LightHeroId[6] = HERO_MP
LightHeroId[7] = HERO_DH
LightHeroId[8] = HERO_WD
LightHeroId[9] = HERO_GA
LightHeroId[10] = HERO_SW
DarkHeroId[0]=HERO_BM
DarkHeroId[1]=HERO_FS
DarkHeroId[2]=HERO_TC
DarkHeroId[3]=HERO_SH
DarkHeroId[4]=HERO_PL
DarkHeroId[5]=HERO_DK
DarkHeroId[6]=HERO_Lich
DarkHeroId[7]=HERO_DL
DarkHeroId[8]=HERO_CL
DarkHeroId[9]=HERO_FL
DarkHeroId[10]=HERO_ES
i = 0
loop
exitwhen i > LightHeroNumMax -1
x=LightStartX + LightBoxRadius*Cos(bj_PI/LightHeroNumMax*i)
y=LightStartY + LightBoxRadius*Sin(bj_PI/LightHeroNumMax*i)
CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),LightHeroId,x,y,-90.0)
x=LightStartX + (LightBoxRadius -CIRCLEDELTA)*Cos(bj_PI/LightHeroNumMax*i)
y=LightStartY + (LightBoxRadius- CIRCLEDELTA)*Sin(bj_PI/LightHeroNumMax*i)
CreateDestructable(CIRCLE,x,y,0,1.0,1)
i++
endloop
i = 0
loop
exitwhen i > DarkHeroNumMax -1
x=DarkStartX + DarkBoxRadius*Cos(bj_PI/DarkHeroNumMax*i)
y=DarkStartY + DarkBoxRadius*Sin(bj_PI/DarkHeroNumMax*i)
CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),DarkHeroId,x,y,-90.0)
x=DarkStartX + (DarkBoxRadius -CIRCLEDELTA)*Cos(bj_PI/DarkHeroNumMax*i)
y=DarkStartY + (DarkBoxRadius- CIRCLEDELTA)*Sin(bj_PI/DarkHeroNumMax*i)
CreateDestructable(CIRCLE,x,y,0,1.0,1)
i++
endloop
endfunction
[/jass] |
|