Update
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
/// ---------------------------------------------
|
||||
/// Ultimate Character Controller
|
||||
/// Copyright (c) Opsive. All Rights Reserved.
|
||||
/// https://www.opsive.com
|
||||
/// ---------------------------------------------
|
||||
|
||||
namespace Opsive.UltimateCharacterController.Character.Identifiers
|
||||
{
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// An identifier component used to specify where the character colliders are located.
|
||||
/// </summary>
|
||||
public class CharacterColliderBaseIdentifier : MonoBehaviour
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 353e9ad4ce84b54499ff9ac86b926c6e
|
||||
timeCreated: 1513274523
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,15 +0,0 @@
|
||||
/// ---------------------------------------------
|
||||
/// Ultimate Character Controller
|
||||
/// Copyright (c) Opsive. All Rights Reserved.
|
||||
/// https://www.opsive.com
|
||||
/// ---------------------------------------------
|
||||
|
||||
namespace Opsive.UltimateCharacterController.Character.Identifiers
|
||||
{
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// Component which specifies that an object should not fade.
|
||||
/// </summary>
|
||||
public class IgnoreFadeIdentifier : MonoBehaviour { }
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 926cd0416d46f81478cb257608c994ca
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,62 +0,0 @@
|
||||
/// ---------------------------------------------
|
||||
/// Ultimate Character Controller
|
||||
/// Copyright (c) Opsive. All Rights Reserved.
|
||||
/// https://www.opsive.com
|
||||
/// ---------------------------------------------
|
||||
|
||||
namespace Opsive.UltimateCharacterController.Character.Identifiers
|
||||
{
|
||||
using Opsive.UltimateCharacterController.StateSystem;
|
||||
#if THIRD_PERSON_CONTROLLER
|
||||
using Opsive.UltimateCharacterController.ThirdPersonController.Character;
|
||||
#endif
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// Identifying component which specifies the object should be hidden while in first person view.
|
||||
/// </summary>
|
||||
public class ThirdPersonObject : StateBehavior
|
||||
{
|
||||
[Tooltip("Should the object be forced visible even if it is in a first person view?")]
|
||||
[SerializeField] protected bool m_ForceVisible;
|
||||
#if !THIRD_PERSON_CONTROLLER
|
||||
[Tooltip("The materials that should be used when the object is visible.")]
|
||||
[SerializeField] protected Material[] m_VisibleMaterials;
|
||||
#endif
|
||||
[Tooltip("Should the object be visible when the character dies? This value will only be checked if the PerspectiveMonitor.ObjectDeathVisiblity is set to ThirdPersonObjectDetermined.")]
|
||||
[SerializeField] protected bool m_FirstPersonVisibleOnDeath = false;
|
||||
|
||||
public bool ForceVisible { get { return m_ForceVisible; }
|
||||
#if THIRD_PERSON_CONTROLLER
|
||||
set { if (m_ForceVisible != value) { m_ForceVisible = value; m_PerspectiveMonitor?.UpdateThirdPersonMaterials(false); } }
|
||||
#else
|
||||
set { m_ForceVisible = value; if (m_Renderer == null) { return; } m_Renderer.materials = m_ForceVisible ? m_VisibleMaterials : m_InvisibleMaterials; }
|
||||
#endif
|
||||
}
|
||||
public bool FirstPersonVisibleOnDeath { get { return m_FirstPersonVisibleOnDeath; } }
|
||||
|
||||
#if THIRD_PERSON_CONTROLLER
|
||||
private PerspectiveMonitor m_PerspectiveMonitor;
|
||||
#else
|
||||
private Renderer m_Renderer;
|
||||
private Material[] m_InvisibleMaterials;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the default values.
|
||||
/// </summary>
|
||||
private void Start()
|
||||
{
|
||||
#if THIRD_PERSON_CONTROLLER
|
||||
m_PerspectiveMonitor = gameObject.GetComponentInParent<PerspectiveMonitor>();
|
||||
#else
|
||||
m_Renderer = gameObject.GetComponent<Renderer>();
|
||||
if (m_Renderer == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_InvisibleMaterials = m_Renderer.materials;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: edead2b42b914a84faf341ae0d10c805
|
||||
timeCreated: 1495587608
|
||||
licenseType: Pro
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user