void Start() { OAExtentions.AssertObjectNotNull(playerState, "Ocean is missing player reference"); // Assure that the object has a trigger collider col = GetComponent <Collider2D>(); col.isTrigger = true; }
void Awake() { OAExtentions.AssertObjectNotNull( prefab, $"OAObjectPool is missing prefab!" ); OAExtentions.AssertObjectNotNull( prefab.GetComponent <OABallisticBullet>(), $"OAObjectPool prefab is no a OABallisticBullet!" ); freePool = new OABallisticBullet[maxSize]; for (var i = 0; i < size; i++) { InstantiateBullet(i); } pooledCount = size; }
void Awake() { OAExtentions.AssertObjectNotNull(bullets, "OARangedWeapon is missing OABulletPool!"); lastFireCounter = fireCooldown; }