entity changes, classes
This commit is contained in:
parent
bda2b88796
commit
8bd4aedcf9
20 changed files with 1917 additions and 27 deletions
|
|
@ -6,6 +6,7 @@ public class RangedWeapon : Weapon
|
|||
private Camera cam;
|
||||
private Vector3 mousePos;
|
||||
[Header("Ranged Weapon Specifics")]
|
||||
public int reloadActionUsage;
|
||||
public bool fired;
|
||||
[SerializeField] private Projectile projectile;
|
||||
private void Start()
|
||||
|
|
@ -40,11 +41,13 @@ public class RangedWeapon : Weapon
|
|||
CreateProjectile(mousePos);
|
||||
fired = true;
|
||||
isAiming = false;
|
||||
thisEntity.actions--;
|
||||
ActionUIHandler.instance.UpdateActions(1);
|
||||
ActionUIHandler.instance.cursorObject.SetActive(false);
|
||||
}
|
||||
else if (Input.GetMouseButtonDown(1))
|
||||
{
|
||||
isAiming = false;
|
||||
ActionUIHandler.instance.cursorObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -53,6 +56,8 @@ public class RangedWeapon : Weapon
|
|||
{
|
||||
Projectile newProjectile = Instantiate(projectile, transform.position, Quaternion.identity);
|
||||
newProjectile.RotateToTarget(target);
|
||||
newProjectile.damage = damage;
|
||||
newProjectile.tag = tag;
|
||||
newProjectile.fromEntity = thisEntity;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue