protected virtual void HandleProjectile(Spatial projectile) { IProjectile iProjectile = projectiles[projectile]; if (iProjectile.IsAlive()) { AttackData attackData = iProjectile.GetAttackData(); Vector3 b = -projectile.Transform.basis.GetAxis(2); projectile.Translation += b * attackData.deltaTime * 5; rayCast = projectile.GetNodeInChildrenByType <RayCast>(); if (rayCast != null && rayCast.IsColliding()) { if (!(attackData.target is IDamageReceiver)) { Node collider = rayCast.GetCollider() as Node; if (collider is IDamageReceiver) { attackData.target = collider; } } base.ProcessAttack(attackData); } } else { iProjectile.Deactivate(); projectiles.Remove(projectile); pooledProjectiles.Enqueue(projectile); } }