fixed being able to use the snow blower and watering can in a cutscene
This commit is contained in:
parent
1995ebcbbb
commit
af52284c52
3 changed files with 23 additions and 16 deletions
|
@ -7,6 +7,12 @@
|
||||||
"commands": [
|
"commands": [
|
||||||
"gamebundle"
|
"gamebundle"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"butlerdotnet": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"commands": [
|
||||||
|
"dotnet-butler"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -128,19 +128,21 @@ namespace GreatSpringGameJam {
|
||||||
|
|
||||||
// item usage
|
// item usage
|
||||||
HeldItem? usingItem = null;
|
HeldItem? usingItem = null;
|
||||||
var rot = this.GetHeldRotation();
|
if (!GameImpl.Instance.IsInCutscene) {
|
||||||
var rotVec = new Vector2(MathF.Cos(rot), MathF.Sin(rot));
|
var rot = this.GetHeldRotation();
|
||||||
if (MlemGame.Input.IsDown(MouseButton.Left)) {
|
var rotVec = new Vector2(MathF.Cos(rot), MathF.Sin(rot));
|
||||||
usingItem = this.heldItem = HeldItem.SnowBlower;
|
if (MlemGame.Input.IsDown(MouseButton.Left)) {
|
||||||
Random.NextUnitVector(out var vel);
|
usingItem = this.heldItem = HeldItem.SnowBlower;
|
||||||
vel = vel * 0.03F + rotVec * 0.13F;
|
|
||||||
this.Map.AddEntity(new SnowBlowerWind(this.Map, this.Position + Vector2.One / 2 + rotVec * 0.75F, vel));
|
|
||||||
} else if (MlemGame.Input.IsDown(MouseButton.Right)) {
|
|
||||||
usingItem = this.heldItem = HeldItem.WateringCan;
|
|
||||||
if (Random.NextSingle() <= 0.45F) {
|
|
||||||
Random.NextUnitVector(out var vel);
|
Random.NextUnitVector(out var vel);
|
||||||
vel = vel * 0.015F + rotVec * 0.03F;
|
vel = vel * 0.03F + rotVec * 0.13F;
|
||||||
this.Map.AddEntity(new WaterDrop(this.Map, this.Position + Vector2.One / 2 + rotVec * 0.65F, vel));
|
this.Map.AddEntity(new SnowBlowerWind(this.Map, this.Position + Vector2.One / 2 + rotVec * 0.75F, vel));
|
||||||
|
} else if (MlemGame.Input.IsDown(MouseButton.Right)) {
|
||||||
|
usingItem = this.heldItem = HeldItem.WateringCan;
|
||||||
|
if (Random.NextSingle() <= 0.45F) {
|
||||||
|
Random.NextUnitVector(out var vel);
|
||||||
|
vel = vel * 0.015F + rotVec * 0.03F;
|
||||||
|
this.Map.AddEntity(new WaterDrop(this.Map, this.Position + Vector2.One / 2 + rotVec * 0.65F, vel));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (var i = 0; i < HeldSounds.Length; i++) {
|
for (var i = 0; i < HeldSounds.Length; i++) {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
cd GreatSpringGameJam
|
cd GreatSpringGameJam
|
||||||
dotnet gamebundle -wlm
|
dotnet gamebundle -wlm
|
||||||
|
dotnet butler push bin/Bundled/win ellpeck/a-breath-of-spring-air:win --fix-permissions
|
||||||
butler push bin/Bundled/win ellpeck/a-breath-of-spring-air:win --fix-permissions
|
dotnet butler push bin/Bundled/linux ellpeck/a-breath-of-spring-air:linux --fix-permissions
|
||||||
butler push bin/Bundled/linux ellpeck/a-breath-of-spring-air:linux --fix-permissions
|
dotnet butler push bin/Bundled/mac ellpeck/a-breath-of-spring-air:mac --fix-permissions
|
||||||
butler push bin/Bundled/mac ellpeck/a-breath-of-spring-air:mac --fix-permissions
|
|
Loading…
Reference in a new issue