예제 #1
0
    /// <summary>
    /// Constructor for the monster object. Only saves the important fields of the EnemyController attached to an enemy.
    /// </summary>
    /// <param name="enemy">Enemy.</param>
    public Monster(EnemyController enemy)
    {
        level = enemy.getLevel ();
        health = enemy.getHealth ();
        maxHealth = enemy.getMaxHealth ();
        attackPower = enemy.getAttackPower ();
        walkingSpeed = enemy.getWalkingSpeed ();
        type = enemy.getType().toString();
        name = enemy.getName();

        location_x = enemy.getPosition().x;
        location_y = enemy.getPosition().y;
        location_z = enemy.getPosition().z;

        rotation_w = enemy.getRotation().w;
        rotation_x = enemy.getRotation().x;
        rotation_y = enemy.getRotation().y;
        rotation_z = enemy.getRotation().z;

        isPoisoned = enemy.getPoisoned();
        isStunned = enemy.getStunned();
    }