Esempio n. 1
0
 public void OverFlowExcessDamage(BigDouble damage, Vector3 pos, int ticksLeft)
 {
     if (overflowChunk)
     {
         BlockController closestBlock = GetClosestBlock(pos, PersistentSingleton <GameSettings> .Instance.OverflowDamageMaxJumpDistance);
         if (closestBlock != null)
         {
             closestBlock.CauseDamageAndOverflowExcess(damage, ticksLeft - 1);
         }
     }
 }
Esempio n. 2
0
    private void CauseDamageToClosestBlockOrBoss(BigDouble damage, Vector3 pos)
    {
        BlockController closestBlock = GetClosestBlock(pos);

        if (closestBlock == null)
        {
            BossBlockController value = BossBlock.Value;
            if (!(value == null))
            {
                value.CauseDamage(damage / 2L);
            }
        }
        else
        {
            Singleton <ChunkRunner> .Instance.overflowChunk = true;
            closestBlock.CauseDamageAndOverflowExcess(damage, PersistentSingleton <GameSettings> .Instance.OverflowDamageTickAmount);
        }
    }