using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Passer {
///
/// Possessions can be owned by an Humanoid
///
///
/// \image html PossessionInspector.png
///
/// * %Possession type, see Possession::possessionType
/// * %Cross site allowed, see Possession::crossSite
/// * %Is unique, see Possession::isUnique
///
/// \version 4
public class Possessable : MonoBehaviour {
///
/// The possession type
///
public enum Type {
Generic, ///< A generic Possession
Avatar, ///< An avatar can be worn by a Humanoid
}
///
/// The Type of Possession
///
public Type possessionType;
///
/// If true, this Posession can be taken to other Sites.
///
/// Non cross site possessions will be removed from the Humanoid's possessions
/// when they leave the site.
public bool crossSite = true;
///
/// An unique Possession can be possessed only once.
///
public bool isUnique = false;
public string siteLocation {
get {
if (SiteNavigator.currentSite == null)
return "";
string siteLocation = SiteNavigator.currentSite.siteLocation;
siteLocation = siteLocation.Substring(0, siteLocation.LastIndexOf("/"));
return (siteLocation + "/possessions");
}
}
public string assetPath;
}
}