예제 #1
0
 void Awake()
 {
     trans = gameObject.transform;
     ps    = GetComponent <PlayerStats>();
     psc   = GetComponent <PlayerStatsCounter>();
     sr    = GetComponentsInChildren <SpriteRenderer>();
     pbc   = new PlayerBulletCache(trans);
 }
예제 #2
0
    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);
        }
    }
예제 #3
0
 void Awake()
 {
     pic   = GetComponent <PlayerInputControl>();
     psc   = GetComponent <PlayerStatsCounter>();
     trans = transform;
 }