コード例 #1
0
        public ShieldLinearWantLinkUiComponent(ILinearShield self, ILinearShield other, Action <bool> fieldRenderOverride, Action buttonAction)
        {
            Self  = self;
            Other = other;
            FieldRenderOverride = fieldRenderOverride;
            ButtonAction        = buttonAction;

            var distance = self.Position.DistanceTo(other.Position);

            PowerNeeded = LinearShieldUtility.CellProtectionFactorCost(distance) * distance;
            Efficiency  = LinearShieldUtility.CalculateFieldEfficiency(distance, self.EfficientRange, other.EfficientRange);
        }
コード例 #2
0
 public static void DrawFieldBetween(IntVec3 one, IntVec3 two, Map map, Color color)
 {
     DrawFieldBetween(LinearShieldUtility.CellsBetween(one, two).ToList(), map, color);
 }