Improving animation timing.

This commit is contained in:
Sarah 2015-08-11 05:37:58 +02:00
parent 186e3028c2
commit 3bedc4ce84
2 changed files with 15 additions and 14 deletions

View File

@ -184,7 +184,7 @@ public class AnimationCarl extends Animation
public void MythicalAnimation()
{
if (getTicks() < 30 && getTicks() % 3 == 0)
if (getTicks() < 30)
{
UtilFirework.playFirework(_creeper.getLocation().add(0.5, 0.5, 0.5), Type.BALL_LARGE, Color.RED, true, true);
}
@ -194,7 +194,7 @@ public class AnimationCarl extends Animation
_creeper.getLocation().getWorld().playSound(_creeper.getLocation().add(0.5, 0.5, 0.5), Sound.PORTAL_TRAVEL, 10F, 2.0F);
_creeper.getLocation().getWorld().playSound(_creeper.getLocation().add(0.5, 0.5, 0.5), Sound.ZOMBIE_UNFECT, 10F, 0.1F);
}
else if (getTicks() < 60)
else if (getTicks() < 40)
{
UtilFirework.launchFirework(_creeper.getLocation().add(0.5, 0.5, 0.5), Type.BALL_LARGE, Color.RED, true, true,
new Vector((Math.random()-0.5)*0.05, 0.1, (Math.random()-0.5)*0.05), 1);
@ -211,11 +211,7 @@ public class AnimationCarl extends Animation
UtilParticle.PlayParticle(UtilParticle.ParticleType.WITCH_MAGIC, location, 0, 0, 0, 0, 1,
ViewDist.NORMAL, UtilServer.getPlayers());
}
}
else if (getTicks() < 60)
{
double radius = 2 - (getTicks() / 10D * 2);
int particleAmount = 20 - (getTicks() * 2);
Location _centerLocation = _creeper.getLocation().add(0.5, 0.1, 0.5);
for (int i = 0; i < particleAmount; i++)
{

View File

@ -1,14 +1,16 @@
package mineplex.core.bonuses.commands;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import mineplex.core.command.CommandBase;
import mineplex.core.common.Rank;
import mineplex.core.reward.RewardType;
import mineplex.core.bonuses.BonusManager;
public class AnimationCommand extends CommandBase<BonusManager>{
BonusManager _plugin;
private BonusManager _plugin;
public AnimationCommand(BonusManager plugin)
{
@ -19,13 +21,16 @@ public class AnimationCommand extends CommandBase<BonusManager>{
@Override
public void Execute(Player caller, String[] args)
{
_plugin.addPendingExplosion(caller, "Test");
_plugin.addPendingExplosion(caller, "Chiss");
_plugin.addPendingExplosion(caller, "Phinary");
_plugin.addPendingExplosion(caller, "xXVevzZXx");
_plugin.addPendingExplosion(caller, "RANK");
_plugin.addPendingExplosion(caller, "DAILY");
if(args != null)
{
caller = Bukkit.getPlayer(args[0]);
_plugin.addPendingExplosion(caller, _plugin.getRewardManager().nextReward(caller, null, false, RewardType.SpinnerFiller, true));
}
if(args.length >= 2)
{
_plugin.addPendingExplosion(caller, args[1]);
}
}