1
This commit is contained in:
@@ -9,7 +9,8 @@
|
||||
"GUID:e527b3ce3106f974585be5134b6200e9",
|
||||
"GUID:e18d548755c9bc8458ca189e16813742",
|
||||
"GUID:d8b63aba1907145bea998dd612889d6b",
|
||||
"GUID:1193c2664d97cc049a6e4c486c6bce71"
|
||||
"GUID:1193c2664d97cc049a6e4c486c6bce71",
|
||||
"GUID:677cd05ca06c46b4395470200b1acdad"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
|
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BITKit;
|
||||
using BITKit.WorldNode;
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
using UnityEngine;
|
||||
@@ -9,15 +10,18 @@ using UnityEngine;
|
||||
namespace Net.Project.B.WorldNode
|
||||
{
|
||||
[Serializable]
|
||||
public struct UnityContainerNode :IWorldNode
|
||||
public class UnityContainerNode :RuntimeItemContainer,IWorldNode,IRuntimeItemContainer
|
||||
{
|
||||
public bool allowAdd;
|
||||
public bool addRemove=true;
|
||||
/// <summary>
|
||||
/// 添加物品
|
||||
/// </summary>
|
||||
public bool AllowAdd { get; set; }
|
||||
public bool AllowAdd => allowAdd;
|
||||
|
||||
/// <summary>
|
||||
/// 移除物品
|
||||
/// </summary>
|
||||
public bool AllowRemove { get; set; }
|
||||
public bool AllowRemove => addRemove;
|
||||
}
|
||||
}
|
||||
|
@@ -38,6 +38,10 @@ namespace Net.Project.B.WorldNode
|
||||
{
|
||||
staticGameObjects = GetComponentsInChildren<Transform>().Where(x=>x.gameObject.isStatic).Select(x=>x.gameObject).ToArray();
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
UnityEditor.EditorUtility.SetDirty(this);
|
||||
#endif
|
||||
|
||||
Debug.Log($"已获取到{staticGameObjects.Length}个物体");
|
||||
}
|
||||
|
18
Src/WorldNode/UnityLootContainerVisualNode.cs
Normal file
18
Src/WorldNode/UnityLootContainerVisualNode.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BITKit.WorldNode;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Net.Project.B.WorldNode
|
||||
{
|
||||
[Serializable]
|
||||
public class LootContainerVisualNode:IWorldNode
|
||||
|
||||
{
|
||||
public Transform visualJoint;
|
||||
public Vector3 emptyJointPosition;
|
||||
public Vector3 emptyJointEuler;
|
||||
public Transform visualModel;
|
||||
}
|
||||
}
|
11
Src/WorldNode/UnityLootContainerVisualNode.cs.meta
Normal file
11
Src/WorldNode/UnityLootContainerVisualNode.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b4272bb2066222d4f80e8809411f3886
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -7,15 +7,132 @@ using BITKit.WorldNode;
|
||||
using UnityEngine;
|
||||
#endif
|
||||
|
||||
namespace Net.Project.B.WorldNode
|
||||
namespace Net.Project.B.WorldNode.Loot
|
||||
{
|
||||
[Serializable]
|
||||
public struct CommonLootNode : IReference
|
||||
{
|
||||
public string Get() => "loot_common";
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct MedicalLootNode : IReference
|
||||
{
|
||||
public string Get() => "loot_medical";
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct MilitaryLootNode : IReference
|
||||
{
|
||||
public string Get() => "loot_military";
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct FoodLootNode : IReference
|
||||
{
|
||||
public string Get() => "loot_food";
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct BeverageLootNode : IReference
|
||||
{
|
||||
public string Get() => "loot_beverage";
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct HouseholdToolsLootNode : IReference
|
||||
{
|
||||
public string Get() => "loot_household_tools";
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct HardwareToolsLootNode : IReference
|
||||
{
|
||||
public string Get() => "loot_hardware_tools";
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct SurvivalGearLootNode : IReference
|
||||
{
|
||||
public string Get() => "loot_survival_gear";
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct ConstructionLootNode : IReference
|
||||
{
|
||||
public string Get() => "loot_construction";
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct ClothingLootNode : IReference
|
||||
{
|
||||
public string Get() => "loot_clothing";
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct ElectronicsLootNode : IReference
|
||||
{
|
||||
public string Get() => "loot_electronics";
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct FuelLootNode : IReference
|
||||
{
|
||||
public string Get() => "loot_fuel";
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct MeleeWeaponLootNode : IReference
|
||||
{
|
||||
public string Get() => "loot_melee_weapon";
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct RangedWeaponLootNode : IReference
|
||||
{
|
||||
public string Get() => "loot_ranged_weapon";
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct ThrowableLootNode : IReference
|
||||
{
|
||||
public string Get() => "loot_throwable";
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct TrapLootNode : IReference
|
||||
{
|
||||
public string Get() => "loot_trap";
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct QuestItemLootNode : IReference
|
||||
{
|
||||
public string Get() => "loot_quest_item";
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct TradeGoodsLootNode : IReference
|
||||
{
|
||||
public string Get() => "loot_trade_goods";
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct AnimalProductLootNode : IReference
|
||||
{
|
||||
public string Get() => "loot_animal_product";
|
||||
}
|
||||
}
|
||||
|
||||
namespace Net.Project.B.WorldNode
|
||||
{
|
||||
[Serializable]
|
||||
public class UnityLootNode : IWorldNode
|
||||
{
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
[SerializeReference, SubclassSelector] private IReference lootName;
|
||||
|
||||
public string LootName=> lootName?.Value;
|
||||
#endif
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
[SerializeReference, SubclassSelector] public IReference lootName;
|
||||
|
||||
public string LootName => lootName?.Value;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@@ -27,13 +27,13 @@ namespace Net.Project.B.WorldNode
|
||||
|
||||
public bool allowAckermannSteering;
|
||||
|
||||
public float steeringWheelAngle=180;
|
||||
public float steeringWheelAngle { get; set; } = 45;
|
||||
|
||||
public float maxForwardSpeed = 100f; // 100f default
|
||||
public float maxReverseSpeed = 30f; // 30f default
|
||||
public float horsePower = 1000f; // 100f0 default
|
||||
public float brakePower = 2000f; // 2000f default
|
||||
public float handbrakeForce = 3000f; // 3000f default
|
||||
public float handbrakeForce = 1000f; // 3000f default
|
||||
public float maxSteerAngle = 30f; // 30f default
|
||||
public float steeringSpeed = 5f; // 0.5f default
|
||||
public float stopThreshold = 1f; // 1f default. At what speed car will make a full stop
|
||||
|
Reference in New Issue
Block a user