Ejemplo n.º 1
0
    void Start()
    {
        Zombie  Z = new Zombie();
        Vampire V = new Vampire();

        //Z.HitPoints = 10;
        //V.HitPoints = 10;    don't need these defined because they are initialized in the Monster constructor.
        Debug.Log(Z.TakeDamage(5));
        Debug.Log(V.TakeDamage(5));
        Debug.Log(Z.ToString());
        Debug.Log(V.ToString());
    }
Ejemplo n.º 2
0
        public void CheckVampireStringVampire()
        {
            var monster = new Vampire();

            Assert.AreEqual("I am a Vampire!", monster.ToString());
        }