// Copyright (c) Pixel Crushers. All rights reserved.
namespace PixelCrushers.DialogueSystem
{
///
/// A location asset. In Chat Mapper, locations are usually used to track the information about
/// locations within the simulation. The dialogue system doesn't do anything with locations,
/// but you're free to use them in your Lua code.
///
[System.Serializable]
public class Location : Asset
{
///
/// Initializes a new Location.
///
public Location() { }
///
/// Copy constructor.
///
/// Source location.
public Location(Location sourceLocation) : base(sourceLocation as Asset) { }
///
/// Initializes a new Location copied from a Chat Mapper location asset.
///
///
/// The Chat Mapper location.
///
public Location(ChatMapper.Location chatMapperLocation)
{
Assign(chatMapperLocation);
}
///
/// Copies a Chat Mapper location asset.
///
///
/// The Chat Mapper location.
///
public void Assign(ChatMapper.Location chatMapperLocation)
{
if (chatMapperLocation != null) Assign(chatMapperLocation.ID, chatMapperLocation.Fields);
}
}
}