virtual public void Init() { if (!inited) { inited = true; view.Init(); view.transform.position = GetRenderPosition(); if (EntityTypeUtil.IsFlyable(model.entityType)) { view.body.Translate(0, Constants.FLY_HEIGHT, 0, Space.Self); IsoHelper.MoveAlongCamera(view.shadow, -2 * Constants.SHADOW_Z_ORDER);//空军的阴影显示在建筑上面 } foreach (var tileEntityComponent in components) { tileEntityComponent.Init(); } } }
/// <summary> /// 是否可飞行 /// </summary> /// <returns></returns> public bool CanFlying() { return(EntityTypeUtil.IsFlyable(model.entityType)); }
/// <summary> /// 特性:是否可穿越墙(飞行兵种和特殊技能和援军) /// </summary> /// <returns></returns> public bool CanOverTheWall() { return(EntityTypeUtil.IsFlyable(model.entityType) || EntityTypeUtil.IsTraitOverTheWall(model) || this.Friendly); }