Examples of GunAnimations


Examples of com.flansmod.client.model.GunAnimations

          break;
        }
      }
      if(hasAmmo)
      {
        GunAnimations animations = null;
        if(left)
        {
          if(FlansModClient.gunAnimationsLeft.containsKey(player))
            animations = FlansModClient.gunAnimationsLeft.get(player);
          else
          {
            animations = new GunAnimations();
            FlansModClient.gunAnimationsLeft.put(player, animations);
          }
        }
        else
        {
          if(FlansModClient.gunAnimationsRight.containsKey(player))
            animations = FlansModClient.gunAnimationsRight.get(player);
          else
          {
            animations = new GunAnimations();
            FlansModClient.gunAnimationsRight.put(player, animations);
          }
        }
        int pumpDelay = gunType.model == null ? 0 : gunType.model.pumpDelay;
        int pumpTime = gunType.model == null ? 1 : gunType.model.pumpTime;
        animations.doShoot(pumpDelay, pumpTime);
        FlansModClient.playerRecoil += gunType.getRecoil(stack);
        if(left)
          FlansModClient.shootTimeLeft = gunType.shootDelay;
        else FlansModClient.shootTimeRight = gunType.shootDelay;
        if(gunType.consumeGunUponUse)
View Full Code Here

Examples of com.flansmod.client.model.GunAnimations

    return fx;
  }

  public static GunAnimations getGunAnimations(EntityLivingBase living, boolean offHand)
  {
    GunAnimations animations = null;
    if(offHand)
    {
      if(FlansModClient.gunAnimationsLeft.containsKey(living))
        animations = FlansModClient.gunAnimationsLeft.get(living);
      else
      {
        animations = new GunAnimations();
        FlansModClient.gunAnimationsLeft.put(living, animations);
      }
    }
    else
    {
      if(FlansModClient.gunAnimationsRight.containsKey(living))
        animations = FlansModClient.gunAnimationsRight.get(living);
      else
      {
        animations = new GunAnimations();
        FlansModClient.gunAnimationsRight.put(living, animations);
      }
    }
    return animations;
  }
View Full Code Here

Examples of com.flansmod.client.model.GunAnimations

    if(type.secondaryFunction == EnumSecondaryFunction.CUSTOM_MELEE)
    {
      //Do animation
      if(entityLiving.worldObj.isRemote)
      {
        GunAnimations animations = FlansModClient.getGunAnimations(entityLiving, false);
        animations.doMelee(type.meleeTime);
      }
      //Do custom melee hit detection
      if(entityLiving instanceof EntityPlayer)
      {
        PlayerData data = PlayerHandler.getPlayerData((EntityPlayer)entityLiving);
View Full Code Here

Examples of com.flansmod.client.model.GunAnimations

        if(left)
          FlansModClient.shootTimeLeft = type.reloadTime;
        else FlansModClient.shootTimeRight = type.reloadTime;
       
        //Apply animations
        GunAnimations animations = null;
        if(left)
        {
          if(FlansModClient.gunAnimationsLeft.containsKey(clientPlayer))
          animations = FlansModClient.gunAnimationsLeft.get(clientPlayer);
        else
        {
          animations = new GunAnimations();
          FlansModClient.gunAnimationsLeft.put(clientPlayer, animations);
        }
        }
        else
        {
        if(FlansModClient.gunAnimationsRight.containsKey(clientPlayer))
          animations = FlansModClient.gunAnimationsRight.get(clientPlayer);
        else
        {
          animations = new GunAnimations();
          FlansModClient.gunAnimationsRight.put(clientPlayer, animations);
        }
        }
      int pumpDelay = type.model == null ? 0 : type.model.pumpDelayAfterReload;
      int pumpTime = type.model == null ? 1 : type.model.pumpTime;
      animations.doReload(type.reloadTime, pumpDelay, pumpTime);
       
      //Iterate over all inventory slots and find the magazine / bullet item with the most bullets
      int bestSlot = -1;
      int bulletsInBestSlot = 0;
      for (int j = 0; j < clientPlayer.inventory.getSizeInventory(); j++)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.