Example #1
0
        public void Activate()
        {
            var factory = new NetworkCardFactory();
            var card    = factory.Create(_summonId);
            var player  = GameObject.Find("Players").transform.Find("Player").gameObject;

            card.transform.SetParent(player.transform.Find("Hand"));
        }
Example #2
0
        public void Activate()
        {
            var factory     = new NetworkCardFactory();
            var pickCardIDs = PhotonNetwork.LocalPlayer.GetPickCards();
            var player      = GameObject.Find("Players").transform.Find("Player").gameObject;
            var playArea    = player.transform.Find("PlayArea").gameObject.GetComponent <PlayArea>();

            foreach (var id in pickCardIDs)
            {
                var card = factory.Create(id);
                playArea.Put(card);
            }
        }
Example #3
0
        public void Execute()
        {
            var cardFactory = new NetworkCardFactory();
            var players     = GameObject.Find("Players");
            var hand        = players.transform.Find("Player").transform.Find("Hand").gameObject;
            var startPlayer = PhotonNetwork.CurrentRoom.GetTurnPlayer();

            foreach (var id in PhotonNetwork.LocalPlayer.GetPickCards())
            {
                var card = cardFactory.Create(id);
                card.transform.SetParent(hand.transform);
            }
            foreach (var id in (startPlayer == PhotonNetwork.LocalPlayer) ? FirstsBreathCards : SecondsBreathCards)
            {
                var card = cardFactory.Create(id);
                card.transform.SetParent(hand.transform);
            }
            PhotonNetwork.LocalPlayer.SetHP(15);
            PhotonNetwork.LocalPlayer.SetMaxVoltage(0);
            PhotonNetwork.LocalPlayer.SetNowVoltage(0);
            PhotonNetwork.LocalPlayer.SetAttack((startPlayer == PhotonNetwork.LocalPlayer) ? 0 : 1);
            PhotonNetwork.LocalPlayer.SetDefence(0);
        }