// Update is called once per frame void Update() { VRPlacementSelector selectedPlacement = GetSelectedPlacement(); Card.VRCardSelector selectedCard = GetSelectedCard(); if (selectedCard == null || selectedPlacement == null) { return; } GameObject mercenary = selectedCard.GetComponent <Card.PlayCard>().GetMercenary(); mercenary.SetActive(true); mercenary.transform.position = selectedPlacement.transform.position; selectedPlacement.PlaceMerc(mercenary); GameObject handPlaceholder = selectedCard.GetComponent <Card.DragCard>().GetHandReplacement(); hand.GetComponent <Card.HandPlacement>().ActivatePlaceholder(handPlaceholder, selectedCard.transform.GetSiblingIndex()); cards.Remove(selectedCard); Destroy(selectedCard.gameObject); selectedPlacement = null; selectedCard = null; }
// Update is called once per frame void Update() { VRPlacementSelector selectedPlacement = GetSelectedPlacement(); Card.VRCardSelector selectedCard = GetSelectedCard(); if (selectedCard == null || selectedPlacement == null) { return; } GameObject mercenary = selectedCard.GetComponent <Card.PlayCard>().GetMercenary(); mercenary.SetActive(true); mercenary.transform.position = selectedPlacement.transform.position; selectedPlacement.PlaceMerc(mercenary); selectedCard.Destroy(); }