Некротехнолог: джинн из урны - появляется по черепу в багажнике
Дух - не сущность, а модель из бандла necrotechnologist, дочерний объект модели урны (как каркас зоны): без хитбокса, ИИ и сохранения. Кончик хвоста в горлышке, дух покачивается и медленно поворачивается; тело полупрозрачное (0.3, как у торговцев), глаза светятся. Появляется и исчезает с порывом (necroTechGust). Команда necrogenie - подгонка высоты, поворота, покачивания и прозрачности в игре. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
35313f2e90
commit
0558f46069
@@ -69,6 +69,7 @@ namespace NecromancerTome
|
||||
{
|
||||
base.OnRemove(_world);
|
||||
RemoveBounds();
|
||||
RemoveGenie(false);
|
||||
XUiC_NecroCinerariumSkullGrid.CloseIfShowing(this);
|
||||
if (!ConnectionManager.Instance.IsServer)
|
||||
{
|
||||
@@ -94,6 +95,7 @@ namespace NecromancerTome
|
||||
{
|
||||
base.OnUnload(_world);
|
||||
RemoveBounds();
|
||||
RemoveGenie(false);
|
||||
XUiC_NecroCinerariumSkullGrid.CloseIfShowing(this);
|
||||
}
|
||||
|
||||
@@ -145,6 +147,7 @@ namespace NecromancerTome
|
||||
{
|
||||
SpawnBounds();
|
||||
}
|
||||
SyncGenie(false);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
@@ -160,6 +163,7 @@ namespace NecromancerTome
|
||||
}
|
||||
HasSkull = _has;
|
||||
SetModified();
|
||||
SyncGenie(true);
|
||||
Debug.Log("[NecromancerTome] Cinerarium: урна " + ToWorldPos() + (_has ? " - череп положен" : " - череп вынут"));
|
||||
}
|
||||
|
||||
@@ -202,6 +206,44 @@ namespace NecromancerTome
|
||||
return true;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// Джинн из урны (CinerariumGenie.cs): есть череп - есть дух.
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
GameObject _genie;
|
||||
public const string GenieSound = "necroTechGust";
|
||||
|
||||
/// <summary>_sound - череп только что положили или вынули (порыв); при загрузке чанка дух появляется молча.</summary>
|
||||
public void SyncGenie(bool _sound)
|
||||
{
|
||||
if (HasSkull && _genie == null)
|
||||
{
|
||||
_genie = CinerariumGenie.Spawn(ModelTransform());
|
||||
if (_genie != null && _sound)
|
||||
{
|
||||
Audio.Manager.BroadcastPlay(World.blockToTransformPos(ToWorldPos()), GenieSound);
|
||||
}
|
||||
}
|
||||
else if (!HasSkull && _genie != null)
|
||||
{
|
||||
RemoveGenie(_sound);
|
||||
}
|
||||
}
|
||||
|
||||
void RemoveGenie(bool _sound)
|
||||
{
|
||||
if (_genie == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
UnityEngine.Object.Destroy(_genie);
|
||||
_genie = null;
|
||||
if (_sound)
|
||||
{
|
||||
Audio.Manager.BroadcastPlay(World.blockToTransformPos(ToWorldPos()), GenieSound);
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// Границы зоны: каркас параллелепипеда, как у земельного камня. Дочерний объект модели блока - сдвиги
|
||||
// Origin и выгрузка чанка его не теряют (как кольцо пирамиды); материал один на все урны.
|
||||
|
||||
Reference in New Issue
Block a user