void Awake() { trans = gameObject.transform; ps = GetComponent <PlayerStats>(); psc = GetComponent <PlayerStatsCounter>(); sr = GetComponentsInChildren <SpriteRenderer>(); pbc = new PlayerBulletCache(trans); }
public void useBomb(PlayerStats ps, PlayerStatsCounter psc) { psc.updateBombs(--ps.currBombs); string prefab = bombPrefab; bool isPiercing = ps.powerLevel >= 3; for (int i = 0; i < bombPath[ps.powerLevel].Length; i++) { ProjectilePool.SharedInstance.GetPooledProjectile(prefab, new Vector3(trans.position.x, trans.position.y, trans.position.z), bombPath[ps.powerLevel][i], ps.bombDamage, -1, isPiercing); } }
void Awake() { pic = GetComponent <PlayerInputControl>(); psc = GetComponent <PlayerStatsCounter>(); trans = transform; }