73 lines
3.7 KiB
C#
73 lines
3.7 KiB
C#
//------------------------------------------------------------
|
|
// Game Framework
|
|
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
|
|
// Homepage: https://gameframework.cn/
|
|
// Feedback: mailto:ellan@gameframework.cn
|
|
//------------------------------------------------------------
|
|
|
|
using UnityEngine;
|
|
|
|
namespace SepCore.Definition
|
|
{
|
|
public static partial class Constant
|
|
{
|
|
/// <summary>
|
|
/// 层。
|
|
/// </summary>
|
|
public static class Layer
|
|
{
|
|
public const string DefaultLayerName = "Default";
|
|
public static readonly int DefaultLayerId = LayerMask.NameToLayer(DefaultLayerName);
|
|
public static readonly LayerMask DefaultLayerMask = 1 << DefaultLayerId;
|
|
|
|
public const string TransparentFXLayerName = "TransparentFX";
|
|
public static readonly int TransparentLayerId = LayerMask.NameToLayer(TransparentFXLayerName);
|
|
public static readonly LayerMask TransparentLayerMask = 1 << TransparentLayerId;
|
|
|
|
public const string IgnoreRaycastLayerName = "Ignore Raycast";
|
|
public static readonly int IgnoreLayerId = LayerMask.NameToLayer(IgnoreRaycastLayerName);
|
|
public static readonly LayerMask IgnoreLayerMask = 1 << IgnoreLayerId;
|
|
|
|
public const string WaterLayerName = "Water";
|
|
public static readonly int WaterLayerId = LayerMask.NameToLayer(WaterLayerName);
|
|
public static readonly LayerMask WaterLayerMask = 1 << WaterLayerId;
|
|
|
|
public const string UILayerName = "UI";
|
|
public static readonly int UILayerId = LayerMask.NameToLayer(UILayerName);
|
|
public static readonly LayerMask UILayerMask = 1 << UILayerId;
|
|
|
|
public const string TargetableObjectLayerName = "Targetable Object";
|
|
public static readonly int TargetableObjectLayerId = LayerMask.NameToLayer(TargetableObjectLayerName);
|
|
public static readonly LayerMask TargetableObjectLayerMask = 1 << TargetableObjectLayerId;
|
|
|
|
public const string PlayerLayerName = "Player";
|
|
public static readonly int PlayerLayerId = LayerMask.NameToLayer(PlayerLayerName);
|
|
public static readonly LayerMask PlayerLayerMask = 1 << PlayerLayerId;
|
|
|
|
public const string EnemyLayerName = "Enemy";
|
|
public static readonly int EnemyLayerId = LayerMask.NameToLayer(EnemyLayerName);
|
|
public static readonly LayerMask EnemyLayerMask = 1 << EnemyLayerId;
|
|
|
|
public const string PlayerBulletLayerName = "PlayerBullet";
|
|
public static readonly int PlayerBulletLayerId = LayerMask.NameToLayer(PlayerBulletLayerName);
|
|
public static readonly LayerMask PlayerBulletLayerMask = 1 << PlayerBulletLayerId;
|
|
|
|
public const string EnemyBulletLayerName = "EnemyBullet";
|
|
public static readonly int EnemyBulletLayerId = LayerMask.NameToLayer(EnemyBulletLayerName);
|
|
public static readonly LayerMask EnemyBulletLayerMask = 1 << EnemyBulletLayerId;
|
|
|
|
public const string PlayerWeaponLayerName = "PlayerWeapon";
|
|
public static readonly int PlayerWeaponLayerId = LayerMask.NameToLayer(PlayerWeaponLayerName);
|
|
public static readonly LayerMask PlayerWeaponLayerMask = 1 << PlayerWeaponLayerId;
|
|
|
|
public const string EnemyWeaponLayerName = "EnemyWeapon";
|
|
public static readonly int EnemyWeaponLayerId = LayerMask.NameToLayer(EnemyWeaponLayerName);
|
|
public static readonly LayerMask EnemyWeaponLayerMask = 1 << EnemyWeaponLayerId;
|
|
|
|
public const string DropLayerName = "Drop";
|
|
public static readonly int DropLayerId = LayerMask.NameToLayer(DropLayerName);
|
|
public static readonly LayerMask DropLayerMask = 1 << DropLayerId;
|
|
}
|
|
}
|
|
}
|