v1.4.4
This commit is contained in:
commit
9c94d113d3
10260 changed files with 1237388 additions and 0 deletions
51
assets/devel/tech/booster/booster.lua
Normal file
51
assets/devel/tech/booster/booster.lua
Normal file
|
@ -0,0 +1,51 @@
|
|||
function init()
|
||||
self.lastJump = false
|
||||
self.lastBoostDirection = nil
|
||||
|
||||
self.energyUsagePerSecond = config.getParameter("energyUsagePerSecond")
|
||||
self.boostSpeed = config.getParameter("boostSpeed")
|
||||
self.boostControlForce = config.getParameter("boostControlForce")
|
||||
end
|
||||
|
||||
function update(args)
|
||||
local boostDirection
|
||||
|
||||
if not mcontroller.onGround() then
|
||||
if not mcontroller.canJump() and args.moves["jump"] and not self.lastJump then
|
||||
local diag = 1 / math.sqrt(2)
|
||||
|
||||
if args.moves["right"] and args.moves["up"] then
|
||||
boostDirection = {self.boostSpeed * diag, self.boostSpeed * diag}
|
||||
elseif args.moves["right"] and args.moves["down"] then
|
||||
boostDirection = {self.boostSpeed * diag, -self.boostSpeed * diag}
|
||||
elseif args.moves["left"] and args.moves["up"] then
|
||||
boostDirection = {-self.boostSpeed * diag, self.boostSpeed * diag}
|
||||
elseif args.moves["left"] and args.moves["down"] then
|
||||
boostDirection = {-self.boostSpeed * diag, -self.boostSpeed * diag}
|
||||
elseif args.moves["right"] then
|
||||
boostDirection = {self.boostSpeed, 0}
|
||||
elseif args.moves["down"] then
|
||||
boostDirection = {0, -self.boostSpeed}
|
||||
elseif args.moves["left"] then
|
||||
boostDirection = {-self.boostSpeed, 0}
|
||||
elseif args.moves["up"] then
|
||||
boostDirection = {0, self.boostSpeed}
|
||||
end
|
||||
elseif args.moves["jump"] and self.lastBoostDirection then
|
||||
boostDirection = self.lastBoostDirection
|
||||
end
|
||||
end
|
||||
|
||||
self.lastJump = args.moves["jump"]
|
||||
self.lastBoostDirection = boostDirection
|
||||
|
||||
if boostDirection and status.overConsumeResource("energy", self.energyUsagePerSecond * args.dt) then
|
||||
mcontroller.controlApproachVelocity(boostDirection, self.boostControlForce)
|
||||
|
||||
animator.setAnimationState("boosting", "on")
|
||||
animator.setParticleEmitterActive("boostParticles", true)
|
||||
else
|
||||
animator.setAnimationState("boosting", "off")
|
||||
animator.setParticleEmitterActive("boostParticles", false)
|
||||
end
|
||||
end
|
BIN
assets/devel/tech/booster/bubble.png
Normal file
BIN
assets/devel/tech/booster/bubble.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 655 B |
45
assets/devel/tech/booster/bubbleboost.animation
Normal file
45
assets/devel/tech/booster/bubbleboost.animation
Normal file
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
"animatedParts" : {
|
||||
"stateTypes" : {
|
||||
"boosting" : {
|
||||
"default" : "off",
|
||||
"states" : {
|
||||
"off" : {
|
||||
},
|
||||
"on" : {
|
||||
"properties" : {
|
||||
"persistentSound" : "/sfx/tech/tech_bubbleboost.ogg"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"parts" : {
|
||||
"bubble" : {
|
||||
"partStates" : {
|
||||
"boosting" : {
|
||||
"on" : {
|
||||
"properties" : {
|
||||
"centered" : true,
|
||||
"image" : "bubble.png"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"particleEmitters" : {
|
||||
"boostParticles" : {
|
||||
"emissionRate" : 20.0,
|
||||
"particles" : [
|
||||
{
|
||||
"particle" : "bubbleboost",
|
||||
"offsetRegion" : [-1, -1.5, 1, 1.5]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
18
assets/devel/tech/booster/bubbleboost.tech
Normal file
18
assets/devel/tech/booster/bubbleboost.tech
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"name" : "bubbleboost",
|
||||
"type" : "legs",
|
||||
|
||||
"scripts" : ["booster.lua"],
|
||||
"animator" : "bubbleboost.animation",
|
||||
|
||||
"description" : "Remind yourself of December 2013 with the Bubble Boost.",
|
||||
"shortDescription" : "Bubble Boost",
|
||||
"rarity" : "Legendary",
|
||||
"icon" : "/tech/bubbleboost.png",
|
||||
|
||||
"chipCost" : 8,
|
||||
|
||||
"boostControlForce" : 750,
|
||||
"boostSpeed" : 30,
|
||||
"energyUsagePerSecond" : 0
|
||||
}
|
23
assets/devel/tech/booster/cameramanboost.animation
Normal file
23
assets/devel/tech/booster/cameramanboost.animation
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"animatedParts" : {
|
||||
"stateTypes" : {
|
||||
"boosting" : {
|
||||
"default" : "off",
|
||||
"states" : {
|
||||
"off" : {
|
||||
},
|
||||
"on" : {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"particleEmitters" : {
|
||||
"boostParticles" : {
|
||||
"emissionRate" : 0.0,
|
||||
"particles" : [
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
18
assets/devel/tech/booster/cameramanboost.tech
Normal file
18
assets/devel/tech/booster/cameramanboost.tech
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"name" : "cameramanboost",
|
||||
"type" : "legs",
|
||||
|
||||
"scripts" : ["booster.lua"],
|
||||
"animator" : "cameramanboost.animation",
|
||||
|
||||
"description" : "Press and hold Jump in the air to float around.",
|
||||
"shortDescription" : "Camera Man Boost",
|
||||
"rarity" : "Legendary",
|
||||
"icon" : "/tech/booster.png",
|
||||
|
||||
"chipCost" : 8,
|
||||
|
||||
"boostControlForce" : 5000,
|
||||
"boostSpeed" : 8,
|
||||
"energyUsagePerSecond" : 0
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue