public override void init() { //空子弹可以优化的 不用加到client数组里! if (this.isNullBullet) { this._transform.SetParent(this.scene.bulletLayer, false); return; } if (this._fightEntity.data.ContainsKey("scale")) { this.scale = Convert.ToSingle(this._fightEntity.data["scale"]); } base.init(); this._transform.SetParent(this.scene.bulletLayer, false); ViewUtils.changeColor(this.gameObject, ViewConstant.SHIP_SHADER_NAME, (Dictionary <string, object>)ViewConstant.shipConfig[((ClientPlayerEntity)this.bulletEntity.ownerPlayer).shipId]); for (int i = 0, len = this._particles.Count; i < len; i++) { this._particles[i].reset(); } this.changeView(true); Color color = MaterialUtils.cloneColor(((ClientPlayerEntity)this.bulletEntity.ownerPlayer).getTeamColor(2)); color.a = 0.5f; ViewUtils.changeColorMaterial(this.gameObject, ViewConstant.EFFECT_SHADER_NAME, color); }