Develop Trading Card Game Battle System With Unity 3D: Part XIX (Testing The Basic Game Mechanics) | Vladimir Limarchenko | Skillshare

Playback Speed

  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Develop Trading Card Game Battle System With Unity 3D: Part XIX (Testing The Basic Game Mechanics)

teacher avatar Vladimir Limarchenko, Game Developer, Unity3d and C#

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

3 Lessons (46m)
    • 1. Testing Playing Creatures and Dragging Attack Target

    • 2. Testing Start Game Sequence

    • 3. Testing All the Basic Game Mechanics

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class

In this class/series we set an ambitious goal of developing our own trading card game with Unity3d and C#, mostly focusing on card game battle mechanics.

This class is dedicated to making some final adjustments and testing the general flow of our game. We'll do some more tuning and we'll make sure that the following features work correctly:

  • When the game starts, each of our players draws 4 cards. The second player gets an extra card from his deck and a Coin card that should give him mana advantage for one turn.
  • Our turn alternating system should work correctly. when the turn starts, a message should be displayed. After some time, we should start seeing a burning rope. Both when the rope burns down and when the end turn button is pressed, a turn should be given to the next player.
  • We should be able to play creatures and attack with them. We'll also test the basic creature effects from Hearthstone that are included into this project (Charge, Windfury). In the final project some Battlecry and Deathrattle effects are also present.

With this class you will gain access to a compete, fully functional Unity project that is an example of a card game battle. The game mechanics are somewhat similar to Hearthstone: custom spells, hero powers, creature effects and so on.

Additional information:

  • The files showed in the course are downloadable from the link that you can find in the "Class Project".
  • The next class of this series will be published on 2017.01.17.

Meet Your Teacher

Teacher Profile Image

Vladimir Limarchenko

Game Developer, Unity3d and C#


I am a Unity3d and C# developer with about 2,5 years of experience in game development. I also have a scientific background. I got a Ph.D. in Theoretical Mechanics in 2014, but then decided to pursue my childhood dream of becoming a game developer. I'm mostly interested in making 2D games. In my opinion, a perfect game should have some tactical or puzzle element to it.

Over the last couple of years I've also worked as an instructor and created several courses on game development. Some of the topics of my courses are: making a 2048 game, building quiz apps, creating a simple virtual pet game, animating 2d characters, building an in-game character customization system.

I'm always willing to experiment and work on some interesting and challenging game mechanics.

See full profile

Class Ratings

Expectations Met?
  • 0%
  • Yes
  • 0%
  • Somewhat
  • 0%
  • Not really
  • 0%
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.


1. Testing Playing Creatures and Dragging Attack Target: Hello, everyone. And thanks a lot for watching the scores in this lecture. We're going to check out how playing creatures onto the battlefield works in the game. And also we'll get to check how the attacks work in the game. I had to introduce a couple of changes to our project. The first change is related to our system off tags, and we don't need it for this lecture, but who definitely need this later. So I had to go to this stag menu, go to add tag, and I've added new tags that say Low Player and a top player. These tags are also used in our scripts, mostly in the script that is responsible for attacking our players with creatures. So we also need them in our project, and we should assign these tags to our player portrait. It's so I will select my player portrait in the lower player area and I'll give it attack off low player and I can hit apply the second change, or rather, a mistake that I've made before was related to our creature prefab. If I activate our pre fabs game object and switch to our creatures, then I should Slyke, the Stargate game object to find our script that is called Hover Preview and previously on Our Creature prefab. This script had some wrong references for our creatures. We want this turn this off while previewing to be set to none. So we don't want this oval frame off our creature disappear when we're previewing and when we are checking out the preview and for the preview game object, I think we've just copied this component from our spell card. It had a wrong reference to our spell card preview. So instead of this, I should have dragged our creature cart preview from here and assigned it to this field. But then I had to hit apply, and now everything is working as it should, and it is also applied to our brief. Now I'll disable pre fabs, another change that I had to make in order to play our creatures because we don't have our turn manager and our turn system in place for now, it means that our players Mana doesn't change when we enter the game, and it's just initialized with the value off zero. So to trick our game into knowing that we can play all the creatures. I've just went to our project, and here we should find the folder with our S O assets creatures. And I have just selected all these creatures by holding shift on my keyboard. And while I have all these guard assets selected, I've changed the value off their mana cost to zero. So now all these creatures, they cost zero. It means that we can play any of these creatures any time in our game, which is exactly what we need for a testing. Of course. Later I'll change these values and all the mana costs for these creatures. They will be not zero and different. There's another change that I had to make in unity. And it's about our table visual. So I'll select the table visual game object. Our table visual has a collider attached to this game object. This collider is a three d collider. So it occupies certain area in the three D space and to achieve the fact that I want I had to play with center coordinates off this glider. So I wanted to shift this glider to make it appear a bit further from the camera. The first question is probably. Why would we want to do this? And the reason for this is that our creatures, when they are added to the battlefield, they rely on the methods that are called on miles down on most up and so on. It means that only the top most game object will be detected. And if our collider is located in the same plane as our creatures, so when it's that coordinate is equal to zero, and it also has some significant thickness. And there might be situation when this glider will cover all our creatures and we won't be able to select them and attack with them. So, of course we don't want this. And that's why in our table visual script, we're not using these methods on mouse enter on mouse something else. We're using ray casting to figure out whether our cursor is over the table or not. And that's why it's so really find to have this collider a bit further from us because it will get detected anyway because we're using Ray casts all. So even if something covers the stable collider, it will still react to us hovering over this area with the mouths so the way to fix this would be to set this center displacement off our books collider ins that coordinate to be equal to one, for example, and our final fix before we actually enter the play mode and test Everything is related to our scripts. So I had to go to my model develop. And here there are these two scripts that are responsible for dragging behavior off our creatures. One of them is called drag creature on table, and another one is called drag Creature. Attack. Both of these scripts, they have this public Boolean property, thirties cold can drag. Previously, it was returning something that was relying on our manager, which is a one card manager for this script. And now we want to simplify everything, and we just want to return True. So we want to allow dragging these game objects at any time, just for test purposes, and for the second script have done the same thing in this can drag property. Previously, it was also accessing the manager, which is of one creature manager for the script, and now I'm just saying return true. So at any time we can try to drag the target on this creature and we can attack. And after these changes, I've saved all the scripts, and now we can go to unity and test how everything works. So I'll launched game. And now to get the creature cards, we have to draw a couple of guards first. So we already have this one creature card. Let's draw at least one more. Now I can grab this card. They scold swamp lor that costs zero, and I can drag it from our hand onto the battlefield, and the only valid place for our new creature is our zero slot. But if we drag it somewhere else, for example, I can drag this creature card over here. And if I release, then this creature will immediately appear on our zero slot. The project is giving me some errors, and they are related to my player portrait visual script. For now, we don't care about our players and will fix all these errors later. Now we'll just focus on our creatures so we can also play this second creature onto the battlefield. And here is the interesting part with our cards, we knew for sure that the card is played onto this zero spot, and with our creatures, we can play them both onto this zero spot. Or I can choose a different location for the second creature. For example, if I drag this creature here on the left off our current creature, then it will appear on the left relative to this old creature on our table. Let's door a couple more cards, so if a president again, we'll get another creature and we can already play this creature. So if I drag this onto the battlefield and, for example, I want this new creature to appear between our existing creatures. So if I release then this new creature that I've just dragged onto the battlefield appears between our old creatures and the layout of these creatures on our table just adapts to whatever we want to do here. And we can also test another feature, which is the feature off attacking with our creatures. So now if I hover over any of these creatures first, our previous work and secondly, I can just try to drag this creature, and when I drag, we have this new arrow with a target gizmo appearing in the scene, and I can select any target for our creatures attack. I don't know what will happen yet. If I try to release and attack this other creature, I don't think that anything will happen. But still, it means that our scripts actually work and the error will be spawned because we have allowed to attack at any time by setting that can drag property in our script to true. And we can do that for any off these creatures. Now I know that there's a slight issue. If I try and drag this arrow on top of this deck, then it will actually, if here, below the deck and below this game object. And if I drag it on top of this stack, the other one, then it will appear on top of the deck and in some cases below. So I think that it could be fixed either by scripting so we can add some displacement to this arrow with this gizmo, and we can make them beer closer to us. Or it can be also resolved by playing with these game objects in our scene. So I'll try both off these approaches, and I'll just come up with the numbers or with some small fix in our code, and then when everything will work, I will just show you the solution. Most importantly, in this lecture, we've actually got to test this creature playing feature in our game. And, for example, I can grab this other card and I can bring it over here that will make it a beer on the first slot and all the other features will be just shifted. So at this point, I think that we should focus on making our application fully functional. So we should bring in our turn manager into the game. And in the next, lecturers who work both in unity and in our Ramona developed to bring all the scripts to where we want them to be in our game and also to establish all the connections that should be happening in our unity editor. Congratulations on getting things far. I would like to thank you very much for watching this course, and I will see you in the next lecture. 2. Testing Start Game Sequence: Hello, everyone. And thanks a lot for watching the scores in our previous lecture about playing are creatures and attacking with our creatures. I forgot to show you one more thing because of the way that we've designed this application . We also have this table game object that is the part off our game logic. And there we have this stable script. The script has a public list, creatures on table. And if we expand this list, we can check out all the creatures that are currently on our table so I can expend each and every of these elements and we'll see our creature logic objects that are present in our games logic. And they will be able to tell us their unique i ds there player owners, the guard asset from which they're made. So at the zeroth element, we currently have this swamp lor. And on our first slot, we currently have this beast. So everything seems to be right. And actually, there's another behavior that is a bit unwanted. And to show you this, I'll have to draw one more creature card. So elbrus de in the scene. And now if I try to drag this creature not onto the table but somewhere else. If I drag it onto our player stable, I know that everything is gonna be fine. But if I do something else, for example, I'll grab him and I'll drag him somewhere over here, for example. Then we'll get an error and our app will crash. And the reason for that is if we open our table visual script and I'll expand my model developed so that you're able to see better and l zoom in on the code Somalo develop shows us that we have an error in this line and it happens because currently in our scene we have just one table, and this script relies on the fact that we should have to tables in our seen. The second table should belong to our opponent, which is our top player. So now l just minimize model develop and I'll exit play mode. Our theme for this lecture is making our top player functional as well, and we want him to have all the same scripts and all the same components as our lower player has, and we're currently talking about the visual part of our game, the easiest way to achieve this is to just copy this lower player area. Remember that we have added this word temp in the end of our top player area. So currently it just shows the places where we want all these bore traits and monopolies and everything else to end up. So and we had another issue in the previous lecture. We had an error, and the reason why we got that arrow is because off our top player area and the thing that caused that error was our script player portrait visual. And it had wrong references for these hero power. I can image and hero power background image, and I'm afraid if we hit, apply right now than these changes will be saved into our prefab. And then something wrong will happen to our lower player area. So now we have just two choices. We can either manage everything like it is right now, or we can create big pre fabs off our top player area and our lower player area and manage them separately. I think that will try to stay with our small, brief EPS for as long as we can. So for now, I'll just duplicate our lower player area by hitting control D in my scene. Then I will drag our lower player area on top and then I'll rearrange everything so that all the elements are located in the same places that we want to have in our top player area . And I can rename this game object right away. Soak your I can say top and I can t raise this one. In the end, I can change the order in the hierarchy here and now. I'll just go to our scene and rearrange all these elements and then I'll get back to you. So now I have rearranged old elements off our top player area. And now if I disable this game object, we still have our top player area attempt and will no longer need this game object. So I can just hit delete on my keyboard and re enable our top player area. So now this game object is much more advanced and it has all the same features that are lower Player area has. But we'll have to check that both for our top player area and for our lower player area. We have correct marks that are called owner for each off our visual game objects, for example, for our top player area. It's currently set correctly and for our lower player area. We should change this to, say low instead of top, and we have to make several adjustments like this here and there. So I'll expand our top player area here for our hand visual. We should select top for our table visual. We should also select top in this script and let's check all the other game objects that we have here for our hero Power Braaten. All the meaningful script stare located on this cylinder game object here. We should also select top in this drop down menu for our player portrait. I guess there is no need to select up here, but we can change the character asset for this character to be elf instead of monk, just like we had with our temporary top player area. We should also place this game object portrait position correctly so that it's located in the center off our portrayed and our adjustments should also touch the logic part for games . So we have this player to game object that for now is just disabled, and I we should re enable this game object. So I'll enable this in the Inspector. And here we have to establish a connection with our player area. So I'll drag our top layer area onto this field. And for now we'll leave this script player turn maker here. If we have a player turned maker attached to our player in logic, it means that we will control this player. So for debug and testing purposes, it's just perfect because we'll get to control both off our players and we'll get to test all the different scenarios. And then in the end of our course, will try and attach a I turn maker to this game. Object so that our second player will be controlled by our computer. And there is one more thing that was bothering me a little. We have this other drawer game object that is our source for other car drove, for example, for our coin card, and we have this similar game object both at the child off our top player area and as a child off our lower player area. And since we have placed this game object right here in the center off our screen I think that there is no point in doing this so we can actually have this game object. Other draw as a child off our visual and I can bring it lower than to be here with our other references for our hand script. So this other drawers should be here and then we can delete this second other drawer game object for this one. I'll just said its coordinates to 000 so that it is just in the centre off our screen and then I will go to both of our hands for this hand. I will assign it this other drawer and for the second hand, it already references this same other draw game object. And I think most of the other changes that we have to make in order for this up to start working our changes to our scripts so I can open Mona develop. The main change, of course, should be made to our script that it's cold turn manager, which is our logic script. So I'll find turn manager, open it and in one off the lectures, I've made a change to the script so that it will not call this method on game start in its start function, and we should uncommon this to do line so that our own game start method is actually gold and start will most likely get some errors in our first lectures, and then we'll gradually work on fixing everything. But I know for sure that this is the right solution, and our own game start method is actually an entry point into our game or into single battle between two players. And while we were testing this application, I've made several changes to some other scripts. So in the other scripts, I've also commented out some lines, and there's an easy way to find all those changes in mono develop. I can press control, shift and F, and this way I'll get to find a certain phrase in all the files. So here it can just search for to do. I think it is not gay sensitive. So here you can either mark your search as gay sensitive if you want to check for lower case and upper case letters, or you can just search for this to do phrase in your whole solution than if I hit find hero . Yet all sorts of different results. Where we wrote to do and probably using to do was not the best solution, because I sometimes used this to do phrase to mark the things that I wanted to make in these strips later. So now we have to go over all these cases when we found to do in our scripts and will have to introduce some meaningful changes. So there are some lines that we want to include in our project, and there are some lines that we want to keep commented. For example, I remember that in our dragging action scripts like Drag, Creature Attack and Drag Creature on Table, we have introduced several changes. So first I'll just close this search window, and here we have included this return. True so that we can always drag our creature ended the real game. This shouldn't be the case, so we should actually check if we can drag the creature by going to our one creature manager. So we should uncommon this line and here, instead of to do, I'll write something like Best Lion and I'll come and tell this return true statement here so I'll just go over all these files and The logic is pretty simple if we have introduced this change, and we wrote this to do phrase during the scores that we should change this and we should uncommon those lies and bring our original lines from the original strips back. And if you find a due to comment or some other commented lines that we didn't introduce during this course, it means that they just contain my thoughts on further development off this app, and we shouldn't touch them. So I'll go over all these scripts and then I'll get back to you and we'll try to actually launch the APP. So I've just finished on commenting our to two statements that we had in this course, and sometimes the students statements they're not meant to be removed it like this one in our method. Remove creature with I D in our table visual strips and here wrote this long common that this has to last for some time. Actually, in the final version off our game, when a creature dies, it will just instantly disappear. But I feel put in some work and you will have an actual animation for your creature dying. Then you can make this method last for a certain amount of time, you will need a do between sequence or some other means off measuring time for your creature to die. And then on complete issued Cole a method Command command Execution complete. So I leave this studio statement for now, and it's a subject for our further research. And now, after I have introduced all these changes, I'll go to file and hit save all so that we save the changes to all our scripts. And now I'll minimize Mona Develop. It seems like we're not getting any new errors. I can clear the errors in the console. And now I don't think that the game will work on our first Dry and will most likely get some errors. And I think that our next lecture will be dedicated to troubleshooting fixing all the errors and actually getting our game to work. But still, I think we should at least make an effort and try to launch the game. Maybe something will work, and we instantly get an error in our player class in the method very school. Transmit info to visual, and the reason for that is that the script of type I D. Holder is most of the time attached to our game objects automatically. And the only place where I thought that we should attach this component manually is for our player portrait. It's actually I don't think that it's such a good idea. So instead off attaching this component manually here instead, off get component. We can call another method that is called at components of here again, just typing ad. And it turns out that for adding a new component, we have to access. Our report reads game objects. So here I will type in game object and put another dot here, and I think this will work. So now I can go to file and hit save, and we can try to relaunch our game again. At least we shouldn't be getting this error. And now when the game is launched, something is already happening. The cards are dealt into our players. Hence, I think that right now we get some other errors in some cases. Do between actually takes care off all the errors, but it includes this trace off our error so that we know exactly in which of our classes and in which method do we get all these errors? So now we have already got something going in our scene, and actually it's a lot. Our whole introduction sequence off. Our players appearing in the center off are seen and then transitioning to their original places. And then all these cards are dealt to our players in the beginning off the game, and that is all happening in the intern start method off our turn manager. The amount off manner for both of our players is set to zero in the beginning of the game, so we have a lot of things that are working already. In the next lecture. I'll try to address all the errors and hopefully we'll get to actually play our game. So far, I'd like to thank you very much for watching this course and I will see you in our next lecture. 3. Testing All the Basic Game Mechanics: Hello, everyone. And welcome back to this course In our previous lecture, we've started to introduce the changes to our project. And our ultimate goal is to make this project actually work in this lecture will continue. Following this path will make all the adjustments that we need in order to make this project work. And the ever that was appearing in our project in the end off our previous lecture was this one. This error was actually handled by do between. But in this trace off the error, we can see that it is caused by our turn managers method on game start. That, in turn, was calling the method. Get a card, not from deck. And this method is called on Lee four, our Korean card. And the reason for getting this error is we still don't have a Korean card in our project. So first I have fixed that. And if I exit play mode, I went to our project s O assets and into the Spells folder in our S O assets. I've added in you card acid that is called Coin. I've selected the card image for this going card, and I've made sure that it's Max Health is set to zero so that our system knows that it's our spell card and that it's mana. Cost is also set to zero and will handle all the other functionality off this card later. For now, we just want to get rid of that error, and we want to get a visual representation off our card. So now, as we have done that, we should also assign a reference to this Korean card in our turn manager. So inside of our logic, I will select our turn manager game object. And it has a reference to our coin card that currently is set to non or no so I can drag the scoring card onto this reference. And we had another reference to our recording card in our global setting script. And now, since we have it in our turn manager, I think that we can actually get rid off this reference in our global settings so I can double click on global settings and I can just comment out this line. Public Guard s It's going card because we no longer need this line. And now I can minimize, model, develop and launch the game now everything should change. So we will actually get the hands off both of our players. And then the player who go second should get the coin card. And I opposed the game. You might also notice if I switch to our game tab that current, the all the cards that we can play are highlighted. And with each turn, our players will get one Jumana crystal to play their cards or to use their hero powers. And there was another issue in our project that also required some fixing. Previously, we were testing the functionality off our rope and off our and turn button. And instead of calling our turn managers method that is cold and turn, we were calling our own method that we've created for debugging that was called an turn tests. So to illustrate that we can select our turn manager and this change or fix, it should be introduced into two different places in our project. The 1st 1 is this rope timer. So now it actually calls our turn managers method that is cold and turn in the stern manager. Previously, it was set to end turn test. So when this timer got 20 It was calling not our method and turned, but this method and turned test that was just updating the taxed on our timer and the state off our rope, and it was doing absolutely nothing in terms off our turns. So now we have changed this to and turn, and we have to introduce this change in one more place in our project. In the visual part off our project, we have this game, object rope and enter and button. And for this and turn button, we have a similar unity event that is called on click. So when we click on this bottom, we want to do the same thing, and we want to call a method on our turn manager that is cold and turn. And previously here it was also set to our N turn tests. So I once these changes are introduced, let me launch the game who see our starting sequence again, and something is actually wrong with the positioning off. Our players sport rates and will have to fix it later. Now it's our second player, Stern, which is our top player and since our top player also has a script that is cold player turned maker. We are also controlling our top player so I can grab one of his cards and Blake creatures for him. And now let's wait until this rope burns down and see what happens. The turn should be given to our first player, which is our lower player. Now we have a turn for this lower player. I can play a couple of creatures as well. I don't know exactly what will happen if I play my coin card because we haven't assigned any effect to this guard yet. So now we can also end our turns manually in effect, press and turn. Then the turn will be given to our second player. All these guards get highlighted, so highlighting with these glow frames actually works and we can try and attack our opponents creatures so we can trade. I don't think that attacking players works. So if I try and attack the player actually attacking players also work. So, uh, I know that there is some problem with attacking this player. I can hit and turn and let's try that with our second player. So, for example, if I attack the second player with our creature then the attack will not happen. And I think that it's happening because off our tag system. So if I exist play mode, I can go to our top player area, expand our top player area game object, find our player portrait and for this game object. We'd like to have a tag top clear and I am not hating. Apply right now because this will apply the changes to both off our players and we don't want that and another important change that we should introduce to our project. All our creatures. They currently have both health and their attack value set to one. And the values for health and attacks should definitely be different for all our creatures . And we should also change their man accosts so they should not cost zero at all times. And we shouldn't be able to play our creatures any time. So now I'll go to my assets as O assets creatures and I'll select each individual creature and I'll come up with some values for their mana cost, health and attack. And with some creatures, we can even play with these values for attack for one turn and charge to give them either charge or wind fury. Facts from Harsh stone. So I'll do that, and then I will return to you with the result. So I have come up with new values for Max House attacks and medicals. For all our feature for this Vulcan creature, I wanted to make it the largest and the scariest creature in the game, so I've made its mana cost six. It's Max. Health will be also six, and its attack will be seven. I don't know if my creatures will turn out balanced. Arnold Balanced is a whole other topic about making card games, and I think that you will come up with your own and creative solutions for balancing your card game. So I'll leave it up to you and for all the other creatures. I've made these changes as well. For this beast creature, it might seem a bit unbalanced. It's mana. Cost is just too, but it is a big creature. It has Max health of four and an attack off four. And the reason why I've selected these stats for this creature is that later I want to add an effect to this creature that will bite our player or it will damage our player by the end of the turn. So this creature has an advantage. It's very big and powerful for this amount off manner, but also it has its downside, so it will damage our player in the end of the turn. And now, if we launched the game, we can see all these new and updated creature. And the only issue that I wanted to address in this lecture another issue is that our player sport rates they appear in the wrong spots in our game. Currently, it's our top players turn and we cannot play any creatures because they're medicals is too . And we have just one man. So I can just press and turn here for this lower player. We have a couple of choices. For example. We can play once Wampler. And then after we play this creature, you can see that we can no longer play all these other creatures so they're no longer highlighted. We'll talk about highlighting in one of our next lectures and we'll discuss how it works. No, we compress and turn. And here I don't remember the exact effect that I have set up for this creature so we can play this feature. It doesn't have charged or win Furia guests. And later I think I'll change the contents off our players decks and we'll get to check some other creatures. For example, for now, I'll exit play mode for this necromancer. I gave him two attacks for one turn, which means that he will have this win fury effect. And for this source, er, I've enabled this Jack Mark that is called charge, which means that this creature will be able to attack right away. So the moment we played, we can instantly attack with this creature on the same turn. And now let's move to our final point for this lecture. When we launched the game, both of our players, they appear here in the center off our screen. And to discover the reason for that, let's open our turn manager script. So I'll go to my model develop. I'll find my turn manager. And here in this starting sequence, the starting sequence is actually contained in this method on game start. So first, even before starting our duty in sequence that will move the players to their correct positions in the scene we're making all these adjustments for our players. So we're setting the man it zero making some other adjustments and then in this line we're setting the position off our players sport rate. And in my previous project, I have used other card draw source off our hand visual script for some reason, and it served as an initial position for both for players. And since we now have this other car drove source in the center off our screen and it's similar for both off our players, I think we should make some different solution. For example, we can introduce a new field to our script player area. That is a visual script, so I'll open our player area and let's focus just on the scripts that will need to accomplish these tasks. So I'll hit save to save our change to global settings. We have wiped out the reference to our Korean card acid there, so I'll hit save and then I'll close all these other scripts to leave us just with our turn manager and our player area. So inside of this player area script, we have a reference to a transform that is called portrayed position and we want to have a reference to another trance firm that will also be public and actually again. Just copy this line by hitting control, See here and basting it here, and it will be called initial portrait position. So during our starting sequence, we want our player to travel from this initial portrait position to our portrait position. And once we have introduced this change, we can go to our turn manager and here we can change this line. So instead of saying our portray its transform position in the beginning, off our sequence to this hand visual something something we can say instead B area initial portrait position, dot position. And these are all the changes that we have to make through our scripts. So now I can go to file and select save all here I can minimize mono develop, and now we should create two new game objects, for example, for our lower player area. I can right click and select, create empty here, and we can call this game object in it. Poor treat pause to have some context and to understand what we're actually doing, we can create a duplicate off our players portrayed. I can parented to our initial portrait position. We can change its coordinates 2000 so that it appears exactly where our initial portrait position will be. And then we can play with the coordinates off this initial portrait position. Game object, for example, if I make it beer closer to us than this player Portrait will also appear closer to our camera. And now I can readjust its Y coordinates, and I think that this will do so. It's OK for our initial portrait position in our lower player area. Now I can just lead this portrait visual that we've used as a reference, and I can create a duplicate of this game object parented to our top player area. Now I can raise this one, and now I can switch back to my scene and just manually readjust the positioning off this game object. So if for our lower player area it was positioned here than for our top player area, we should put it somewhere around here and now to make it a work, we don't have to forget to assign these references to our player areas, So now I'll select our lower player area and assign a reference to this initial portrait position and for our top player area. I'll do the same thing. No again launched the game and test how everything works. So if I hit play, then the sport rates will appear nice and large in our scene. And then they will travel to the spots where they will be doing our battle. And now our top player doesn't have any options for history in, so I can just press and turn here for our lower player. For now, we can just play this swamp lor and remember that we had to test the feature off attacking this second character. So for this character, I'll play Creature. Then I'll hit and turn. Then here we should be able to attack our opponents character. So else, like this creature dragged this gizmo onto our opponents and then because we have the correct tags, were actually able to attack that character. I can play this big meanie in, and currently it is unbalanced because it doesn't have that special effect, and I can press and turn. Currently, the deck for this player is very un interesting, so we've just left him with this one card and they can attack this median, for example. Plea another meaning for this player and select and turn. And here I don't remember exactly the facts for this medians. I think that this one has charged. So if we play this minion, it instantly gets highlighted and I can attack right away. So that's one of our effects here. I can trade, for example, and they can in turn, and we'll also have to check out another effect on this necromancer. I'll play a couple of millions here and turn, and this necromancer he will not have charged. So who have to actually wait until the next turn to do something with this character? Now I can trade a couple times, and on our next turn, I'll just skip it her. And I guess so. Here will Jory card. I'll skip a turn, and now we want to test the wind fury function. So this character or this creature has to a tax return so I can attack once and then instantly it gets re highlighted and we can attack another time with this minion. And after this it doesn't get highlighted so we can no longer attack with him and now there are still several issues. I don't think that our Korean spell currently works correctly, so we haven't discussed spell effects yet. And our hero powers. They also use so called spell effects who have to discuss what spell effects do and how they work in one of our next lectures. And just to test this, I will re enter our play mode, hit and turn for this creature. Currently we have this hero power. Highlight it. So if I press on this hero power, then we get an error object reference not set to an instance of an object. Later, we will resolve all the issues and will get rid off all these errors. But I think that in this lecture we have already made a significant progress. So first we now have representation over the scoring spell and it is given to our player that has second turn. And because we have set up everything correctly, this coin spell doesn't cause any errors right now than our manner. It's already counting correctly. So in the beginning, off each turn, each of our players gets one point of manner. Old highlights are working and wind fury and charge mechanics are already working in the game. We've changed the amounts off attack health and MENA costs for our creatures to make them different and more interesting. And I'll exit play mode for now. In the next lecture, I think we'll discuss our spell effects and how they work. So we want our corn card to actually give an advantage for one turn to our second player. And we also want to enable our hero powers. And in this project for hero powers, we use the scripts off the same type that is cold spell effect. So actually, playing our hero power is somewhat similar to casting a spell. We spend a certain amount of mana, and then a certain effect is caused just once. So I would like to thank you very much for watching the scores, and I'm excited to see you in the next lecture.