46 lines
1.1 KiB
C#
46 lines
1.1 KiB
C#
public class EntityChunkObserver : EntityAlive
|
|
{
|
|
public override void Awake()
|
|
{
|
|
base.Awake();
|
|
//this.MaxLedgeHeight = 4;
|
|
if (this.ModelTransform)
|
|
{
|
|
this.animator = this.ModelTransform.GetComponentInChildren<Animator>();
|
|
}
|
|
}
|
|
|
|
public override Color GetMapIconColor()
|
|
{
|
|
return new Color(1f, 0.8235294f, 0.34117648f);
|
|
}
|
|
|
|
public override void playStepSound(string stepSound)
|
|
{
|
|
}
|
|
|
|
public override bool isGameMessageOnDeath()
|
|
{
|
|
return false;
|
|
}
|
|
|
|
public override void OnUpdateLive()
|
|
{
|
|
base.OnUpdateLive();
|
|
}
|
|
|
|
public override void VisiblityCheck(float _distanceSqr, bool _masterIsZooming)
|
|
{
|
|
bool bVisible = _distanceSqr < (float)(_masterIsZooming ? 14400 : 8100);
|
|
this.emodel.SetVisible(bVisible, false);
|
|
}
|
|
|
|
public override bool CanDamageEntity(int _sourceEntityId)
|
|
{
|
|
Entity entity = this.world.GetEntity(_sourceEntityId);
|
|
return !entity || entity.entityClass != this.entityClass;
|
|
}
|
|
|
|
private Animator animator;
|
|
}
|