Esempio n. 1
0
 public void SetEnemyData(EnemyAiScript.XmlConstruct enemyData)
 {
     SetVector3(m_position, enemyData.CurrentPosition);
     SetVector3(m_rotation, enemyData.CurrentRotation);
     SetString(m_lastWaypointName, enemyData.LastWaypointName);
     SetString(m_nextWaypointName, enemyData.NextWaypointName);
     SetInt(m_movementPattern, (int)enemyData.Pattern);
     SetBool(m_isHunting, enemyData.IsHunting);
     SetString(m_huntingWaypointSourceName, enemyData.HuntingWaypointSourceName);
     SetString(m_huntingWaypointName, enemyData.HuntingWaypointName);
 }
Esempio n. 2
0
    public EnemyAiScript.XmlConstruct GetEnemyData()
    {
        EnemyAiScript.XmlConstruct enemyData = new EnemyAiScript.XmlConstruct();
        enemyData.CurrentPosition           = GetVector3(m_position);
        enemyData.CurrentRotation           = GetVector3(m_rotation);
        enemyData.LastWaypointName          = GetString(m_lastWaypointName);
        enemyData.NextWaypointName          = GetString(m_nextWaypointName);
        enemyData.Pattern                   = (EnemyAiScript.MovementPattern)GetInt(m_movementPattern);
        enemyData.IsHunting                 = GetBool(m_isHunting);
        enemyData.HuntingWaypointSourceName = GetString(m_huntingWaypointSourceName);
        enemyData.HuntingWaypointName       = GetString(m_huntingWaypointName);

        return(enemyData);
    }