コード例 #1
0
    private void Demolish(GameObject gameObject)
    {
        ElectricNetworkConnector electricNetworkConnector = gameObject.GetComponent <ElectricNetworkConnector>();

        if (electricNetworkConnector != null)
        {
            electricNetworkConnector.HandleDemolishingBy(PlayerManager.electricNetworkManager);
            return;
        }

        Destroy(gameObject);
    }