public static void PlayerShipInteraction(IPlayer player, IShip ship, InteractionType type) { if (type.Equals(InteractionType.PlayerTakesShipControl)) { ship.Driver = player; player.Ship = ship; player.Camera.enabled = false; ship.Camera.enabled = true; } if (type.Equals(InteractionType.PlayerReleasesShipControl)) { ship.Driver = null; player.Ship = null; player.Camera.enabled = true; ship.Camera.enabled = false; } if (type.Equals(InteractionType.PlayerTakesShipGunsControl)) { ship.Shooter = player; ship.GunController.Shooter = player; //todo to ship controller logic player.Ship = ship; player.Camera.enabled = false; ship.GunController.GunCamera.enabled = true; } if (type.Equals(InteractionType.PlayerReleasesShipGunsControls)) { ship.Shooter = null; ship.GunController.Shooter = null; //todo to ship controller logic player.Ship = null; player.Camera.enabled = true; ship.GunController.GunCamera.enabled = false; } }
/// <summary> /// Convenience to allow implementors of <see cref="IValidatingInteractionAdvisor" /> etc to determine /// if the interaction's type applies. /// </summary> public bool TypeEquals(InteractionType other) => InteractionType.Equals(other);
public bool Equals(DestinyVendorInteractionDefinition input) { if (input == null) { return(false); } return (( InteractionIndex == input.InteractionIndex || (InteractionIndex.Equals(input.InteractionIndex)) ) && ( Replies == input.Replies || (Replies != null && Replies.SequenceEqual(input.Replies)) ) && ( VendorCategoryIndex == input.VendorCategoryIndex || (VendorCategoryIndex.Equals(input.VendorCategoryIndex)) ) && ( QuestlineItemHash == input.QuestlineItemHash || (QuestlineItemHash.Equals(input.QuestlineItemHash)) ) && ( SackInteractionList == input.SackInteractionList || (SackInteractionList != null && SackInteractionList.SequenceEqual(input.SackInteractionList)) ) && ( UiInteractionType == input.UiInteractionType || (UiInteractionType.Equals(input.UiInteractionType)) ) && ( InteractionType == input.InteractionType || (InteractionType != null && InteractionType.Equals(input.InteractionType)) ) && ( RewardBlockLabel == input.RewardBlockLabel || (RewardBlockLabel != null && RewardBlockLabel.Equals(input.RewardBlockLabel)) ) && ( RewardVendorCategoryIndex == input.RewardVendorCategoryIndex || (RewardVendorCategoryIndex.Equals(input.RewardVendorCategoryIndex)) ) && ( FlavorLineOne == input.FlavorLineOne || (FlavorLineOne != null && FlavorLineOne.Equals(input.FlavorLineOne)) ) && ( FlavorLineTwo == input.FlavorLineTwo || (FlavorLineTwo != null && FlavorLineTwo.Equals(input.FlavorLineTwo)) ) && ( HeaderDisplayProperties == input.HeaderDisplayProperties || (HeaderDisplayProperties != null && HeaderDisplayProperties.Equals(input.HeaderDisplayProperties)) ) && ( Instructions == input.Instructions || (Instructions != null && Instructions.Equals(input.Instructions)) )); }
/// <summary> /// Convenience to allow implementors of <see cref="IValidatingInteractionAdvisor" /> etc to determine /// if the interaction's type applies. /// </summary> public bool TypeEquals(InteractionType other) { return(InteractionType.Equals(other)); }