public ShowPlant(int id) { this.id = id; HashMap<String, String> hashMap = plants.get(id); String path = hashMap.get("path"); showSprite = CCSprite.sprite(path); showSprite.setAnchorPoint(0, 0); bgSprite = CCSprite.sprite(path); bgSprite.setOpacity(100); // 给背景精灵设置透明度 bgSprite.setAnchorPoint(0, 0); }