public void SetInformation(ProjectileInfoPack infoPacket) { //Take the information provided to this object to alter current null variables myParent = infoPacket.thisObject; enemyPos = infoPacket.enemyObjectPos; moveSpeed = infoPacket.newSpeed; }
void ThrowProjectile() { //On attack input, instantiate the projectile if (attackInput) { var infoPack = new ProjectileInfoPack(); infoPack.thisObject = this.gameObject; infoPack.enemyObjectPos = otherPlayer.transform.position; infoPack.newSpeed = combatSettings.projectileSpeed; EventManager.instance.OnProjectileCreation.Invoke(infoPack); } }