Advertisement
Guest User

my spells [unity3d]

a guest
Jul 10th, 2016
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class SpecialAttack : MonoBehaviour
  5. {
  6. public Fighter player;
  7. public KeyCode key;
  8. public double damagePercentage;
  9. public int stunTime;
  10. public bool inAction;
  11. public GameObject partcileEffect;
  12. public int projectile;
  13. public bool opponentBased;
  14.  
  15. // Use this for initialization
  16. void Start ()
  17. {
  18.  
  19. }
  20.  
  21. // Update is called once per frame
  22. void Update ()
  23. {
  24. if(Input.GetKeyDown(key) && !player.specialAttack)
  25. {
  26. player.resetAttackFunction();
  27. player.specialAttack = true;
  28. inAction = true;
  29. }
  30.  
  31. if(inAction)
  32. {
  33. if(player.attackFunction(stunTime, damagePercentage, key, partcileEffect, projectile, opponentBased))
  34. {
  35.  
  36. }
  37. else
  38. {
  39. inAction = false;
  40. }
  41.  
  42. }
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement