public void Battle()
 {
     FightSystem.Startfight(player1, player2);
     //return new ServerReply(req.Protocol, "409 Conflict", "Error: User doesnt own a deck!", "text");
     Assert.AreEqual("player1", FightSystem.winner);
     Assert.AreEqual("player2", FightSystem.looser);
 }
Example #2
0
 // Start is called before the first frame update
 void Start()
 {
     fightSystem    = GameObject.Find("FightSystem").GetComponent <FightSystem>();
     thisReceiver   = this.GetComponent <UnityCharacter>().Character;
     unityInventory = GameObject.Find("Canvas").transform.Find("Inventory").GetComponent <UnityInventory>();
     unitySpellbook = GameObject.Find("Canvas").transform.Find("SpellBook").GetComponent <UnitySpellbook>();
     message        = GameObject.Find("Canvas").transform.Find("MessageBox").GetComponent <ChangeMessage>();
     dialogSystem   = GameObject.Find("DialogSystem").GetComponent <DialogSystem>();
     questSystem    = GameObject.Find("QuestSystem").GetComponent <QuestSystem>();
 }
Example #3
0
 private void Start()
 {
     FightSystem.GetInstance().Player1.fightStep[0] = FightSystem.GetInstance().Player1.GetComponent <UpBlock>();
     FightSystem.GetInstance().Player1.fightStep[1] = FightSystem.GetInstance().Player1.GetComponent <DownBlock>();
     FightSystem.GetInstance().Player1.fightStep[2] = FightSystem.GetInstance().Player1.GetComponent <UpAttack>();
     FightSystem.GetInstance().Player1.fightStep[3] = FightSystem.GetInstance().Player1.GetComponent <DownAttack>();
     FightSystem.GetInstance().Player1.fightStep[4] = FightSystem.GetInstance().Player1.GetComponent <UpAttack>();
     FightSystem.GetInstance().Player1.fightStep[0].UseSkill();
     FightSystem.GetInstance().Player1.fightStep[1].UseSkill();
     FightSystem.GetInstance().Player1.fightStep[2].UseSkill();
     FightSystem.GetInstance().Player1.fightStep[3].UseSkill();
     FightSystem.GetInstance().Player1.fightStep[4].UseSkill();
 }
Example #4
0
 public void Initialize()
 {
     world     = new EntityWorld();
     system    = new FightSystem();
     rulesMock = new Mock <IRules>();
     rulesMock.Setup(m => m.GetScore(MoveType.Paper, MoveType.Rock)).Returns(1);
     system.Rules = rulesMock.Object;
     world.SystemManager.SetSystem(system, Artemis.Manager.GameLoopType.Update);
     player1Entity = world.CreateEntity();
     player1Entity.AddComponent(new Player("player1"));
     player1Entity.AddComponent(new Move()
     {
         MoveType = MoveType.Paper
     });
     player2Entity = world.CreateEntity();
     player2Entity.AddComponent(new Player("player2"));
     player2Entity.AddComponent(new Move()
     {
         MoveType = MoveType.Rock
     });
 }
Example #5
0
 //public bool IsFight = false;
 // Start is called before the first frame update
 void Start()
 {
     fightSystem = this;
 }
Example #6
0
 public void Init()
 {
     FightS = FightSystem.Instance;  //获取数据
     SetDeck();                      //设置卡组和墓地
     AddHand(FightS.DeckListA.Hand); //设置手牌
 }
Example #7
0
 private void Awake()
 {
     player1     = GameObject.FindGameObjectWithTag("Player1").GetComponent <Player1>();
     player2     = GameObject.FindGameObjectWithTag("Player2").GetComponent <Player2>();
     _fightSytem = GetComponent <FightSystem>();
 }
Example #8
0
 public void Start()
 {
     //DialogPanel.SetActive(false);
     _playerControllerExperimental = Player.GetComponent <PlayerControllerExperimental>();
     _fightSystem = Player.GetComponent <FightSystem>();
 }
Example #9
0
 void Awake()
 {
     Instance = this;
 }