public ProjectileData Load(ProjectileData otherData) { _baseDamage = otherData._baseDamage; _damageVariance = otherData._damageVariance; _destroyOnCollision = otherData._destroyOnCollision; _maxLifetime = otherData._maxLifetime; _lifetime = otherData._lifetime; HadCollision = false; return(this); }
public WeaponData Load(WeaponData otherData) { _projectile = otherData._projectile; _firePositionOffset = otherData._firePositionOffset; _fireDirection = otherData._fireDirection; _fireProjectileSpeed = otherData._fireProjectileSpeed; _inverseRateOfFire = otherData._inverseRateOfFire; _timeSinceLastShot = otherData._timeSinceLastShot; _allowedToFire = otherData._allowedToFire; return(this); }
public void Clear() { _projectile = null; _firePositionOffset = _fireDirection = Vector2.zero; _inverseRateOfFire = _timeSinceLastShot = _fireProjectileSpeed = 0; }