public void FollowNewUser(NodeAddedEvent e, WeaponNode weapon, [JoinByUser] FollowedBattleUserNode followedBattleUser) { if (!weapon.Entity.HasComponent <CameraTargetComponent>()) { CameraTargetComponent component = new CameraTargetComponent(weapon.weaponInstance.WeaponInstance); weapon.Entity.AddComponent(component); } }
public void AddCameraTarget(NodeAddedEvent e, WeaponNode weapon, [Context, JoinByTank] SelfTankReadyForCameraNode tank) { if (!weapon.Entity.HasComponent <CameraTargetComponent>()) { CameraTargetComponent component = new CameraTargetComponent { TargetObject = weapon.weaponInstance.WeaponInstance.gameObject }; weapon.Entity.AddComponent(component); } }