Move and consolidate many third-party plugin files and metadata from various locations (notably Assets/Third Parties/Plugins 1 and scattered Opsive/Photon folders) into a unified Assets/Plugins directory. Includes DOTween, PrimeTween, Native/BackroomsNoise, Sirenix/Odin Inspector, and Opsive UltimateCharacterController/shared libs, plus updates to several .meta files and removal of obsolete installer/legacy files. This standardizes plugin layout and cleans up duplicate/obsolete assets.
52 lines
1.8 KiB
C#
52 lines
1.8 KiB
C#
/// ---------------------------------------------
|
|
/// Ultimate Character Controller
|
|
/// Copyright (c) Opsive. All Rights Reserved.
|
|
/// https://www.opsive.com
|
|
/// ---------------------------------------------
|
|
|
|
namespace Opsive.UltimateCharacterController.Items
|
|
{
|
|
using Opsive.Shared.Game;
|
|
using Opsive.Shared.Utility;
|
|
using Opsive.UltimateCharacterController.Character;
|
|
using Opsive.UltimateCharacterController.StateSystem;
|
|
using UnityEngine;
|
|
|
|
/// <summary>
|
|
/// Describes any perspective dependent properties for the ItemAction.
|
|
/// </summary>
|
|
public abstract class ItemPerspectiveProperties : StateBehavior
|
|
{
|
|
[Tooltip("The corresponding ID of the action component that this object belongs to.")]
|
|
[SerializeField] protected int m_ActionID;
|
|
|
|
[NonSerialized] public int ActionID { get { return m_ActionID; } set { m_ActionID = value; } }
|
|
|
|
protected GameObject m_Object;
|
|
protected GameObject m_Character;
|
|
protected UltimateCharacterLocomotion m_CharacterLocomotion;
|
|
protected Transform m_CharacterTransform;
|
|
|
|
public abstract bool FirstPersonItem { get; }
|
|
|
|
/// <summary>
|
|
/// Initialize the default values.
|
|
/// </summary>
|
|
protected override void Awake()
|
|
{
|
|
base.Awake();
|
|
|
|
var perspectiveItems = GetComponents<PerspectiveItem>();
|
|
for (int i = 0; i < perspectiveItems.Length; ++i) {
|
|
if (perspectiveItems[i].FirstPersonItem == FirstPersonItem) {
|
|
m_Object = perspectiveItems[i].Object;
|
|
break;
|
|
}
|
|
}
|
|
|
|
m_CharacterLocomotion = gameObject.GetCachedParentComponent<UltimateCharacterLocomotion>();
|
|
m_Character = m_CharacterLocomotion.gameObject;
|
|
m_CharacterTransform = m_Character.transform;
|
|
}
|
|
}
|
|
} |