Fixed links
This commit is contained in:
parent
bdf02db5c8
commit
eb408a62bb
18 changed files with 40 additions and 42 deletions
|
|
@ -8,7 +8,7 @@ public partial class PlantEyesightLimiter : CollisionShape2D
|
|||
{
|
||||
if (Shape is SegmentShape2D segment)
|
||||
{
|
||||
segment.B = new Vector2(Utility.RightFieldBoundary.X - GlobalPosition.X+Utility.TileWidth/2.0f, 0);
|
||||
segment.B = new Vector2(FieldParams.RightFieldBoundary.X - GlobalPosition.X+FieldParams.TileWidth/2.0f, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -9,7 +9,7 @@ public partial class ThreepeaterShooter : Shooter
|
|||
{
|
||||
for(int i = -1; i <= 1; i++)
|
||||
{
|
||||
if (GetParent<Node2D>().GlobalPosition.Y+i*Utility.TileHeight >= Utility.RightFieldBoundary.Y || GetParent<Node2D>().GlobalPosition.Y+i*Utility.TileHeight <= Utility.LeftFieldBoundary.Y)
|
||||
if (GetParent<Node2D>().GlobalPosition.Y+i*FieldParams.TileHeight >= FieldParams.RightFieldBoundary.Y || GetParent<Node2D>().GlobalPosition.Y+i*FieldParams.TileHeight <= FieldParams.LeftFieldBoundary.Y)
|
||||
continue;
|
||||
|
||||
var instance = _projectile.Instantiate<Node2D>();
|
||||
|
|
@ -19,7 +19,7 @@ public partial class ThreepeaterShooter : Shooter
|
|||
if(i != 0)
|
||||
{
|
||||
var tween = CreateTween().SetEase(Tween.EaseType.Out).SetTrans(Tween.TransitionType.Sine);
|
||||
tween.TweenProperty(instance,"position:y",instance.Position.Y+i*Utility.TileHeight,0.5);
|
||||
tween.TweenProperty(instance,"position:y",instance.Position.Y+i*FieldParams.TileHeight,0.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public partial class AloeBehaviour : BaseBehaviour
|
|||
{
|
||||
_tree.Set("parameters/Tree/conditions/charged",_charge);
|
||||
|
||||
var checkPos = GetParent<Node2D>().GlobalPosition + Vector2.Right * Utility.TileWidth;
|
||||
var checkPos = GetParent<Node2D>().GlobalPosition + Vector2.Right * FieldParams.TileWidth;
|
||||
if(_charge && PoolContainer.Instance.TryGetEntity(checkPos, out RuntimePlantData plantData))
|
||||
{
|
||||
if((float)plantData.HP / (float)plantData.MaxHP < _hpTreshold)
|
||||
|
|
@ -33,7 +33,7 @@ public partial class AloeBehaviour : BaseBehaviour
|
|||
|
||||
public void Heal()
|
||||
{
|
||||
var checkPos = GetParent<Node2D>().GlobalPosition + Vector2.Right * Utility.TileWidth;
|
||||
var checkPos = GetParent<Node2D>().GlobalPosition + Vector2.Right * FieldParams.TileWidth;
|
||||
if (PoolContainer.Instance.TryGetEntity(checkPos, out RuntimePlantData plantData))
|
||||
{
|
||||
plantData.Heal(1200 + 0.5f * plantData.MaxHP, GetParent());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue