⮞ Go to NeoFPS.com

    Show / Hide Table of Contents

    Class ModularFirearmAttachmentSocket

    Inheritance
    Object
    MonoBehaviour
    ModularFirearmAttachmentSocket
    Implements
    INeoSerializableComponent
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: NeoFPS.ModularFirearms
    Assembly: NeoFPS.dll
    Syntax
    public class ModularFirearmAttachmentSocket : MonoBehaviour, INeoSerializableComponent

    Properties

    attachmentSystem

    Declaration
    public ModularFirearmAttachmentSystem attachmentSystem { get; }
    Property Value
    Type Description
    ModularFirearmAttachmentSystem

    currentAttachment

    Declaration
    public ModularFirearmAttachment currentAttachment { get; }
    Property Value
    Type Description
    ModularFirearmAttachment

    currentAttachmentIndex

    Declaration
    public int currentAttachmentIndex { get; }
    Property Value
    Type Description
    System.Int32

    nullAttachmentName

    Declaration
    public string nullAttachmentName { get; }
    Property Value
    Type Description
    System.String

    numAttachments

    Declaration
    public int numAttachments { get; }
    Property Value
    Type Description
    System.Int32

    socketName

    Declaration
    public string socketName { get; }
    Property Value
    Type Description
    System.String

    Methods

    ApplyStartingAttachment()

    Declaration
    protected virtual void ApplyStartingAttachment()

    Attach(ModularFirearmAttachment, Vector3)

    Declaration
    public bool Attach(ModularFirearmAttachment attachmentPrefab, Vector3 offset)
    Parameters
    Type Name Description
    ModularFirearmAttachment attachmentPrefab
    Vector3 offset
    Returns
    Type Description
    System.Boolean

    Attach(Guid)

    Declaration
    public bool Attach(Guid guid)
    Parameters
    Type Name Description
    System.Guid guid
    Returns
    Type Description
    System.Boolean

    Attach(Int32)

    Declaration
    public bool Attach(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Returns
    Type Description
    System.Boolean

    Awake()

    Declaration
    protected void Awake()

    CanAttach(ModularFirearmAttachment)

    Declaration
    public bool CanAttach(ModularFirearmAttachment attachmentPrefab)
    Parameters
    Type Name Description
    ModularFirearmAttachment attachmentPrefab
    Returns
    Type Description
    System.Boolean

    GetAttachmentAtIndex(Int32)

    Declaration
    public ModularFirearmAttachment GetAttachmentAtIndex(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Returns
    Type Description
    ModularFirearmAttachment

    GetFilteredAttachments(List<ModularFirearmAttachment>)

    Declaration
    public void GetFilteredAttachments(List<ModularFirearmAttachment> output)
    Parameters
    Type Name Description
    System.Collections.Generic.List<ModularFirearmAttachment> output

    InstantiateAttachment(ModularFirearmAttachment, Vector3)

    Declaration
    protected virtual ModularFirearmAttachment InstantiateAttachment(ModularFirearmAttachment attachmentPrefab, Vector3 offset)
    Parameters
    Type Name Description
    ModularFirearmAttachment attachmentPrefab
    Vector3 offset
    Returns
    Type Description
    ModularFirearmAttachment

    OnAttachmentChanged(ModularFirearmAttachment, Boolean)

    Declaration
    protected virtual void OnAttachmentChanged(ModularFirearmAttachment attachment, bool wasNull)
    Parameters
    Type Name Description
    ModularFirearmAttachment attachment
    System.Boolean wasNull

    OnDestroy()

    Declaration
    protected void OnDestroy()

    OnSocketConnected()

    Declaration
    public virtual void OnSocketConnected()

    OnSocketDisconnected()

    Declaration
    public virtual void OnSocketDisconnected()

    PreAttachmentChange(ModularFirearmAttachment, Boolean)

    Declaration
    protected virtual void PreAttachmentChange(ModularFirearmAttachment from, bool toNull)
    Parameters
    Type Name Description
    ModularFirearmAttachment from
    System.Boolean toNull

    ReadProperties(INeoDeserializer, NeoSerializedGameObject)

    Declaration
    public void ReadProperties(INeoDeserializer reader, NeoSerializedGameObject nsgo)
    Parameters
    Type Name Description
    INeoDeserializer reader
    NeoSerializedGameObject nsgo

    RemoveAttachment()

    Declaration
    public void RemoveAttachment()

    Start()

    Declaration
    protected void Start()

    TransferAttachmentTo(ModularFirearmAttachmentSocket)

    Declaration
    public void TransferAttachmentTo(ModularFirearmAttachmentSocket other)
    Parameters
    Type Name Description
    ModularFirearmAttachmentSocket other

    WriteProperties(INeoSerializer, NeoSerializedGameObject, SaveMode)

    Declaration
    public void WriteProperties(INeoSerializer writer, NeoSerializedGameObject nsgo, SaveMode saveMode)
    Parameters
    Type Name Description
    INeoSerializer writer
    NeoSerializedGameObject nsgo
    SaveMode saveMode

    Events

    onAttachmentChanged

    Declaration
    public event UnityAction<ModularFirearmAttachment> onAttachmentChanged
    Event Type
    Type Description
    UnityAction<ModularFirearmAttachment>

    Implements

    INeoSerializableComponent
    Back to top Copyright © 2019 Yondernauts Game Studios Ltd
    Generated with DocFX