Exemple #1
0
            static void Main(string[] args)
            {
                Mage mage;

                mage.hp     = 100;
                mage.attack = 50;

                Mage mage2 = mage;

                mage2.hp = 0;

                knight knight = new knight();

                knight.hp     = 100;
                knight.attack = 10;

                knight knight2 = knight.Clone();

                knight2.hp = 0;
            }
Exemple #2
0
 static void KillMage(Mage mage)
 {
     mage.hp = 0;
 }