Egret Engine 2D - 遮罩

 
矩形遮罩
shp.mask = new egret.Rectangle(20,20,30,50);
 
注意如果rec发生变化,需要重要将rec赋值给shp.mask
删除遮罩的方法
sprite.mask = null
显示对象作为遮罩,无需像矩形遮罩那样重复赋值 mask,但是 mask 必须是显示列表里元素。
   
   
   
posted @ 2017-09-02 21:31  jason_xiao  阅读(503)  评论(0编辑  收藏  举报