예제 #1
0
    protected override void OnDeathActions()
    {
        pushPull.BreakPull();
        float delay = 0f;

        switch (LastDamageType)
        {
        case DamageType.BRUTE:
            delay = 0.1f;
            break;

        case DamageType.BURN:
            delay = Random.Range(0.2f, 2f);
            break;                     //surprise
        }

        string killer = "God";

        if (LastDamagedBy != null)
        {
            killer = LastDamagedBy.name;
        }
        StartCoroutine(explodeWithDelay(delay, killer));

        //            Logger.Log("FuelTank ded!");
    }
예제 #2
0
        private void disableInteraction()
        {
            for (var i = 0; i < colliders.Length; i++)
            {
                colliders[i].enabled = false;
            }

            objectActions.BreakPull();
            registerTile.UpdateTileType(TileType.None);
            objectActions.allowedToMove = false;
            objectActions.isPushable    = false;
        }
    private void disableInteraction()
    {
        for (int i = 0; i < colliders.Length; i++)
        {
            colliders[i].enabled = false;
        }

        objectActions.BreakPull();
        registerTile.IsClosed       = false;
        objectActions.allowedToMove = false;
        objectActions.isPushable    = false;
    }
예제 #4
0
    protected override void OnDeathActions()
    {
        pushPull.BreakPull();
        var delay = 0f;

        switch (LastDamageType)
        {
        case DamageType.BRUTE:
            delay = 0.1f; break;

        case DamageType.BURN:
            delay = Random.Range(0.2f, 2f); break;        //surprise
        }
        StartCoroutine(explodeWithDelay(delay, LastDamagedBy));

//            Debug.Log("FuelTank ded!");
    }