function onBtn(Flags, X, Y){
var ret = SGWorld.Window.PixelToWorld(X, Y,1|8192);
if(ret.ObjectID!=""){ //选中了模型或者3dml中单体模型
var obj=SGWorld.Creator.GetObject(ret.ObjectID);
if(obj){
if(obj.ObjectType==33){
if(currentSelectObj == null){
currentSelectObj = obj;
}else{
currentSelectObj.Terrain.Tint.abgrColor=0x00000000;
currentSelectObj=null;
}
obj.Tint.abgrColor=0xff0000ff;
}
}
}else{
if(currentSelectObj!=null)
{
if(currentSelectObj.ObjectType==17)
{
currentSelectObj.Terrain.Tint.abgrColor=0x00000000;
currentSelectObj=null;
}
else if(currentSelectObj.ObjectType==33)
{
currentSelectObj.Tint.abgrColor=0x00000000;
currentSelectObj=null;
}
}
}
SGWorld.DetachEvent("onLButtonDown", onBtn);
return false;
}
skyline中改变模型颜色
最新推荐文章于 2021-08-01 13:50:06 发布