All Classes Namespaces Functions Variables Enumerations Enumerator Properties
plyGame.Targetable Class Reference

base class for Targetable objects like character, item and object More...

Inherits MonoBehaviour.

Inherited by plyGame.CharacterControllerBase, plyGame.InteractObject, plyGame.plyItem, and plyGame.plyObject.

Public Types

enum  Type { Type.Character = 1, Type.Object = 2, Type.Item = 4, Type.Unknown = 1024 }
 The targetable types More...
 

Public Member Functions

virtual Type TargetableType ()
 Override to identify what kind of Targetable this is. More...
 
virtual bool MustFaceToInteract ()
 Override to to specify when facing the object is not needed to interact with it. Default is True. More...
 
virtual object DataObject ()
 This should return the object that contains the "data". The data includes some or all of the following public fields being present in the object: public string ident; public string screenName; public string shortName; public string meta; public string description; public Texture2D[] images = new Texture2D[3]; More...
 

Public Attributes

GeneralCallback onDestroy
 Assign to this a delegate to respond to this object being destroyed.
 

Protected Member Functions

void OnDestroy ()
 

Detailed Description

base class for Targetable objects like character, item and object

Member Enumeration Documentation

The targetable types

Enumerator
Character 

Character.

Object 

Interactable Object.

Item 

Item.

Unknown 

Unknown.

Member Function Documentation

virtual object plyGame.Targetable.DataObject ( )
virtual

This should return the object that contains the "data". The data includes some or all of the following public fields being present in the object: public string ident; public string screenName; public string shortName; public string meta; public string description; public Texture2D[] images = new Texture2D[3];

Reimplemented in plyGame.CharacterControllerBase.

virtual bool plyGame.Targetable.MustFaceToInteract ( )
virtual

Override to to specify when facing the object is not needed to interact with it. Default is True.

virtual Type plyGame.Targetable.TargetableType ( )
virtual

Override to identify what kind of Targetable this is.

Reimplemented in plyGame.CharacterControllerBase.