Пример #1
0
  @Override
  public void onUpdate() {
    float var2 = pixelmon.baseStats.width * pixelmon.baseStats.giScale * pixelmon.getScale();
    float var4 = rand.nextFloat() * (float) Math.PI * 2.0F;
    float var5 = rand.nextFloat() * 4F + .5F;
    float var6 = MathHelper.sin(var4) * var2 * .5F * var5;
    float var7 = MathHelper.cos(var4) * var2 * .5F * var5;

    if (count <= 0) {
      particlesOn = !particlesOn;
      if (particlesOn) count = (new Random()).nextInt(3);
      else count = (new Random()).nextInt(21);
    }
    count--;
    if (particlesOn)
      ClientProxy.spawnParticle(
          EnumPixelmonParticles.koffing,
          pixelmon.worldObj,
          pixelmon.posX + (double) var6,
          pixelmon.posY + pixelmon.hoverTimer + 2.5F,
          pixelmon.posZ + (double) var7,
          pixelmon.getIsShiny());
  }
Пример #2
0
  public void onUpdate() {
    super.onUpdate();
    if (worldObj.isRemote) {
      float var2 = baseStats.Width * baseStats.giScale * getScale();
      float var4 = this.rand.nextFloat() * (float) Math.PI * 2.0F;
      float var5 = this.rand.nextFloat() * 4F + .5F;
      float var6 = MathHelper.sin(var4) * var2 * .5F * var5;
      float var7 = MathHelper.cos(var4) * var2 * .5F * var5;

      if (count <= 0) {
        particlesOn = !particlesOn;
        if (particlesOn) count = (new Random()).nextInt(3);
        else count = (new Random()).nextInt(27);
      }
      count--;
      if (particlesOn)
        ClientProxy.spawnParticle(
            EnumPixelmonParticles.koffing,
            worldObj,
            posX + (double) var6,
            posY + hoverTimer + 1.5F,
            posZ + (double) var7);
    }
  }